您的位置: 首页 > 科技

6 Force-Directed digram代写、代做 java/Python 编程

2024-04-21 来源:互联网


 Submit Assignment 6 Force-Directed digram | Gradescope
 1/10
0/4 Questions Answered
 Submit Assignment 6 Force-Directed digram | Gradescope
 2/10
Assignment 6 Force-Directed digram
 Submit Assignment 6 Force-Directed digram | Gradescope
 3/10
Q1 Bubble chart showing the hubs of airlines
100 Points
In this assignment, you will build a bubble chart into the work
you have completed in Assignment 5. We use the bubble chart
to answer the following questions:
Which cities are the hubs worldwide?
Which cities are the hubs of an airline?
The visualization looks like the screenshot below:
(You may visit this link: https://infovis?assignments.vercel.app/assignment6)
You should put all your code in the Assignment6/student code/
(available here). The following files are given, and they are the
sample solution of Assignment 5,
assignment6_student.js : the file wraps up all React components of
the visualization.
airportMap.js : the React components for the map.
barChart.js : the component for the bar chart.
utils.js : it contains several data processing functions, e.g.,
groupByAirline, and groupByAirport;
axes.js , routes.js , and assignment6_styles.module.css ;
Note:
 Submit Assignment 6 Force-Directed digram | Gradescope
 4/10
You should use Next.js in this assignment.
Read the instructions and the start code carefully before you start.
The file structure is as shown in the below figure,
 Submit Assignment 6 Force-Directed digram | Gradescope
 5/10
Q1.1 Group the routes by cities
30 Points
Complete the function groupByCity in the utils.js . This
function is very similar to the other two functions in the file. It
has one input "data" and returns an array of objects. The
following figure is an example of an object in the returned
array,
The object has several keys, and we will use the following two
in the following tasks.
City : the name of the city
Count : the number of routes that start from or end in the city.
In airportBubble.js , there is a console.log(groupByCity(routes))
in line 8. So, when you complete the function and run the
webpack server, you can see the following in the console of
your browser,
Hint: you should refer to groupByAirline and groupByAirport .
 Submit Assignment 6 Force-Directed digram | Gradescope
 6/10
Upload your utils.js here:
Please select file(s) Select file(s)
Save Answer
?
 Submit Assignment 6 Force-Directed digram | Gradescope
 7/10
Q1.2 Build the bubble chart
40 Points
Complete the component AirportBubble in airportBubble.js .
The bubble chart is plotted in the <svg> whose id is "bubble"; in
the bubble chart, each circle is a city, and the size of the circle
represents the number of routes related to the city. You need
to write code for the following tasks:
When selectedAirline is null, it returns the bubble chart showing
the hub cities worldwide.
When selectedAirline is not null, it returns the bubble chart
showing the hub cities of the selected airline.
For the detailed settings, please read the instructions in the
start code.
Reference:
Position forces: https://d3js.org/d3-force/position;
Collide forces: https://d3js.org/d3-force/collide
The expected output is like the below figure, and when you hover the
mouse on a bar, the bubble chart should change accordingly.
 Submit Assignment 6 Force-Directed digram | Gradescope
 8/10
Upload your airportBubble.js here:
Please select file(s) Select file(s)
Save Answer
?
 Submit Assignment 6 Force-Directed digram | Gradescope
 9/10
Q1.3 Update the interaction
27 Points
So far, the bubble chart of a selected airline appears when the
mouse hovers over the bar, and it disappears when the mouse
is out. In this task, you need to modify the barChart.js as
follows,
Change the mouse event in from onMouseOver to onClick ;
Remove the onMouseOut event in ;
Define a callback function onClick for the mouse event, so that,
when the mouse clicks a bar, the bar will be highlighted, and the
bubble chart will show the bubbles of the selected airline. When the
mouse clicks this selected bar for the second time, it will unselect the
bar, and the color of the bar will turn to normal.
The expected output is like the figure below, and when you
click a bar for the first time, the bar will be highlighted, and the
bubble chart will change to the selected airline.
When you click the same bar for a second time, the bar will
turn to normal, and the bubble chart will change back to the
hubs worldwide.
Upload your barChart.js here:
 Submit Assignment 6 Force-Directed digram | Gradescope
 10/10
Please select file(s) Select file(s)
Save Answer
Q1.4 Deploy your project to vercel
3 Points
Now you have completed all the code. It is time to put your
work online. Please follow the steps introduced in Week 4's
Next.js slides,
1. connect your GitHub account to Vercel;
2. change the assignment5_student.js to
assignment6_[yourname].js;
3. check if there is a .gitignore in your project. If not, create one
and copy-paste this .gitignore to it. So, when you push your
code to GitHub, it will ignore the unnecessary files for the
next.js project;
4. push your project code to your GitHub;
5. deploy your project using Vercel;
When you successfully deploy it, please paste your link below:
Save Answer
Save All Answers Submit & View Submission ?

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp

[ 编辑: code ]
02-05 Ins高效群发软件,Instagram智能监控引流软件带你成为外贸专家!
Ins高效群发软件,Instagram智能监控引流软件带你成为外贸专家!
在数字时代,社交媒体已成为企业推广与营销的重要阵地,而Instagram [详细]
06-07 Instagram全球采集软件-ins全球采集工具/ig博主推广神器/ins自动采集/ig批量私信/ins协议号源头
Instagram全球采集软件-ins全球采集工具/ig博主推广神器/ins自动采集/ig批量私信/ins协议号源头
这款Instagram营销软件是一种多功能的工具,能够满足现代社交媒体 [详细]
03-26 外贸疑问时刻 WhatsApp拉群营销工具为何让我充满了好奇
外贸疑问时刻 WhatsApp拉群营销工具为何让我充满了好奇
 外贸之路,充满了无数的疑问与挑战。而在众多营销工具中,WhatsApp [详细]
03-08 道通智能新品行业应用无人机Autel Alpha发布,旗舰性能全面升级
道通智能新品行业应用无人机Autel Alpha发布,旗舰性能全面升级
低空经济发展进入战略机遇期的当下,无人机的发展成为各界对齐关注 [详细]