BW #47: Minimum wage
For many Americans, the start of 2024 also meant higher wages, thanks to updated minimum wage requirements in many states. This week, we compare minimum wage across states and time.
Inflation has been a major topic of discussion over the last few years, and while the inflation rate has dropped quite a bit in the United States (and to a lesser degree in other countries), people are realizing that a decrease in inflation does not necessarily result in prices returning to pre-inflation levels. (Dropping prices is known as "deflation," and that's generally considered to be even worse than inflation.)
Everyone always wants to earn more than they did before, but when inflation strikes, people feel even more pressure to find higher-paying jobs. We've previously (in BW #14) looked at the JOLTS data, which shows how often people leave their current jobs, and switching jobs is clearly one way to earn more. But if you're in a low-paying job, earning minimum wage, then you might not have that option. What do you do then?
You appeal to the politicians running your state, that's what. And it seems to have worked; according to the New York Times and the Economic Policy Institute, 21 states raised their minimum wage levels over the New Year holiday.
This week, we'll look at minimum wage in the United States, with an eye toward recent changes in the minimums.
Data and six questions
The data this week comes from FRED, the St. Louis Fed's portal for economic data (https://fred.stlouisfed.org/). The data consists of CSV files from (nearly) all 50 states, with info and download links from this page:
https://fred.stlouisfed.org/release?rid=387
Part of the challenge this week involves figuring out how to download the data. I will say that when you go to a particular state's minimum-wage page (e.g., https://fred.stlouisfed.org/series/STTMINWGOH), click on "Download" and then select "CSV," you'll get a two-column CSV file with a date column (January 1st of the year for which we're reporting) and a value column. Notice that the data on FRED comes from URLs that end with `STTMINWGXX`, where the `XX` can be replaced by the state's two-letter code. That's not quite enough to get the data, but it's a good start.
This week, I'll ask you six questions about the data. The learning goals for this week include combining multiple files into a single one, time series, and plotting.
I'll be back tomorrow with detailed solutions, including my Jupyter notebook. Meanwhile, here are this week's questions:
- Create a series containing the abbreviations for all US states. I found a source here: https://github.com/jasonong/List-of-US-States
- Create a data frame in which there is one row per year, and the columns are two-letter state abbreviations. Be sure to treat the index as datetime values. If no data appears to be available for the state, then ignore it.