Learning goals

  • Get experience with maps by reproducing the two plots shown in this example (labels included).
  • Understand absolute vs relative file paths
  • Start creating work that’s reproducible

Honor code

For this problem set I worked with:

Question 1: Show interactive map of all Clinton campaign stops

Use the pres_2016_trail data frame from the fivethiryeight package to plot an interactive leaflet map of all of Hilary Clinton’s 2016 campaign stops. Hint: There are two ways of doing this:

  1. By plotting the data from a data frame and mapping the appropriate latitude and longitude variables (see leaflet markers page for hints)
  2. By plotting the data from an sf object (the mapping of latitude and longitude is done automatically)

Question 2: Show static map of Washington state shapefile

Plot a static map of the 39 counties in Western Washington using the shapefiles in the WA_counties folder. Hint: See the example of reading in shapefiles in the MP3 RStudio Project folder.