Silicon Valley University Visual Analytics R and R Studio Code

Description

Part 1:

  1. produce a scatterplot of the by_country data with the points colored by consent_law
  2. Using facet_wrap() split the consent_law variable into two panels and rank the countries by donation rate within the panels
  3. Use geom_pointrange() to create a dot and whisker plot showing the mean of donors and a confidence interval. 
  4. Create a scatterplot of roads_mean v. donors_mean with the labels identifying the country sitting to the right or left of the point
  5. load the ggrepel() library
  6. 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. 
  7. What is the electoral college?
  8. 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.
  9. 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.
  10. Add a label in a rectangle to the previous plot that says “Spa = Spain & Ita = Italy

Part 2:

  1. Return to the visualization for Presidential Elections: Popular and Electoral College margins, subset by party, and use that to add color to your points.
  2. Recreate figures 5.28 using functions from the dplyr library.
  3. Using gss_sm data, calculate the mean and median number of children by degree
  4. Using gapminder data, create a boxplot of life expectancy over time.

Get your college paper done by experts

Do my question How much will it cost?

Place an order in 3 easy steps. Takes less than 5 mins.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *