Assignment Instructions:

Assignment 4 is slightly more open-ended than prior assignments. You need to make a choropleth using any data you want for any map you want but you can’t use the state.x77 dataset used in the notes. You’ll need to find the data on your own. Due to the complexities of working with leaflet, you are strongly advised to initial start with a ggmap or ggplot static map so you have something to submit within the time constraints.

Data I Found:

I found a State Demographics Dataset that was found using the URL: https://corgis-edu.github.io/corgis/csv/state_demographics/ . This dataset has a lot of good demographic information and in my chart, I used the variable “Income.Median.Household.Income”.

Chart:

I first added the tidyverse and ggmap library to rstudio. I added the demographic csv dataset and the us_states ggmap dataset. After adding the two datasets, I renamed the “States” variable in the demographic dataset to “region”, so then I can inner join the the two datasets. I then used ggplot and geom_polygon to make the map chart that is below. The chart has a household income scale on the right side, which has a scale of “Dark Green”, to “White” for middle, and then to “Dark Red” for the lower medium income states.