In this homework, we plot the mean wages over the US states.

The Document

Start by creating a new RMarkdown document named hw7-wages.Rmd using the standard homework format.

library(tidyverse)       
library(readxl)
library(tigris)

The Purpose

The purpose of this analysis is to visualize the average wages for the different US states.

The Data

The data for this homework come from two sources.

  1. The tigris dataset provides the state geographies.
us_state_geographies <- tigris::states() %>% 
  shift_geometry()
  1. This spreadsheet provides the mean wages by state. You’ll need to cleanse this data.
state_mean_wages_raw <- 
  read_excel("data/BLS-wages-by-state.xlsx",
             col_types = c("text", "numeric"), 
             skip = 4)

Data Wrangling

You’ll combine these datasets to produce geospatially-categorized wage data, and focus only on the rows for the 50 states.

Data Visualization

Produce a choropleth visualization that shows the average annual wages for all 50 states.

Do you notice any interesting patterns in this data?