University Solutions Hub provides Visual Analytics Week 7 solution
(Visual Analytics).
Week 7: Plotting text
- produce a scatterplot of the by_country data with the points colored
by consent_law
- Using facet_wrap() split the consent_law variable into two panels
and rank the countries by donation rate within the panels
- Use geom_pointrange() to create a dot and whisker plot showing the
mean of donors and a confidence interval.
- Create a scatterplot of roads_mean v. donors_mean with the labels
identifying the country sitting to the right or left of the point
- load the ggrepel() library
- using the elections_historic data, plot the presidents popular vote
percentage v electoral college vote percentage. draw axes at 50% for
each attribute and use geom_text_repel() to keep the labels from
obscuring the points.
- What is the electoral college?
- create a new binary value column in organdata called ‘ind’ populated
by determining whether the ccode is “Spa” or “Ita” and the year is after
than 1998.
- create an organdata plot of Roads v. Donors and map the ind
attribute to the color aesthetic. Label those points with the ccode and
suppress the legends.
- Add a label in a rectangle to the previous plot that says “Spa =
Spain & Ita = Italy”.
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.