University Solutions Hub provides Visual Analytics Week 15 solution
(Visual Analytics).
Week 15: Mapping.
- pipe the election data through the select() function to pick out the
following columns - state, total_vote, r_points, pct_trump, party,
census. Pipe that through sample() to see the first five rows.
- Create a state level dotplot of election data except the District of
Columbia faceted by region. Colorize the dots by party and insert a
vertical line dividing the parties, scale the x axis from -30 to +40,
put the states on the y axis and label each facet by region and the
entire set by “Point Margin”.
- create a colorized map of the states of the United States without a
legend using the Albers projection.
- remove the grid lines and axis labels, if any, and color the
previous map according to the 2016 election results - red for Trump,
blue for Clinton
- create a red colored gradient map of Trump voters by percentage in
each state with the deeper intensity of the color reflecting the higher
the percentage
- create map of Trump v. Clinton with purple showing the midpoint
between red (Trump) and blue (Clinton).
- create a map of opiate related adjusted death rates per state
faceted by year from 2000 to 2014. Use a viridis scale color gradient
and an Albers projection.
- What regions stand out to you as bearing watching? Why?
- show the opiate data as a time series, faceted by region showing all
states within the region and adding a smoothing curve.
- Interpret the features of this set of graphs.
Note:
Only for knowledge gain and helping to the students(who are facing
difficulties when solving to the Assessments/ Home works) with their
course support.