Minimum Wage and Unemployment in the U.S.

Paul Lee

Between conservative and progressive viewpoints, there is strong disagreement on the ethical and economic points behind raising the minimum wage. The most prevalent and consistent argument brought forth by conservative economists is that increases in the minimum wage coincide with an increase in unemployment as a result of labor becoming more expensive and therefore less desireable.

The purpose of this project is to examine the historical and statistical relationship between the two factors in the United States over the last 3 decades.

All data was acquired from the FRED.

We are looking at three main variables

  1. Unemployment rate over a period of time
  2. Cost of living measured by the historical CPI
  3. Minimum wage over a period of time

In [735]:
%matplotlib inline

import pandas as pd             
import pandas_datareader as pd_rd
from pandas_datareader import data
import sys
import numpy as np
import matplotlib.pyplot as plt
import datetime
import re
import seaborn.apionly as sns
import plotly
import plotly.graph_objs as go  
import plotly.plotly as py
from plotly.offline import iplot, iplot_mpl
import cufflinks as cf 
cf.set_config_file(offline=True, offline_show_link=False)
import requests
from bs4 import BeautifulSoup


Here we import data on the federal minimum wage for the USA.

For all datasets, we are starting at 1984 because the base CPI is set to that year.


In [365]:
minwage_usa_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\\Data'

minwage_usa_file = '\\MinwageUSA.csv'

minwage_usa = pd.read_csv(path + file, 
                             skiprows=543)

minwage_usa.columns = ['Date', '$/hr']

minwage_usa['$/hr'] = minwage_usa['$/hr'].astype(float)

minwage_usa.head()


Out[365]:
Date $/hr
0 1984-01-01 3.35
1 1984-02-01 3.35
2 1984-03-01 3.35
3 1984-04-01 3.35
4 1984-05-01 3.35

Importing data on CPI of USA with base = 100 at 1984


In [364]:
cpi_usa_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'

cpi_usa_file = '\\CPI_USA.csv'

cpi_usa = pd.read_csv(cpi_usa_path + cpi_usa_file,
                     skiprows=444)

cpi_usa.columns = ['Date', 'CPI']

cpi_usa['CPI'] = cpi_usa['CPI'].astype(float)
cpi_usa.head()


Out[364]:
Date CPI
0 1984-01-01 102.1
1 1984-02-01 102.6
2 1984-03-01 102.9
3 1984-04-01 103.3
4 1984-05-01 103.5

Here we create a new variable "Ratio" which is the ratio of the minimum wage to the CPI for the same month and year. This variable will serve as a measure of the livability of a minimum wage in relation to the changes in prices of a general basket of goods.

Essentially, the ratio variable lets us control and adjust for changes in cost of living over the last 30 years.


In [589]:
ratio_usa = (minwage_usa['$/hr']/cpi_usa['CPI'])*10
ratio_usa = ratio_usa.to_frame()
ratio_usa.columns = ['Minwage/CPI Ratio']

cpi_usa1 = pd.concat([cpi_usa, ratio_usa], axis=1).fillna(0.0)
cpi_usa1.head()


Out[589]:
Date CPI Minwage/CPI Ratio
0 1984-01-01 102.1 0.328110
1 1984-02-01 102.6 0.326511
2 1984-03-01 102.9 0.325559
3 1984-04-01 103.3 0.324298
4 1984-05-01 103.5 0.323671

Import US Unemployment rate


In [381]:
ur_usa_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
ur_usa_file = '\\USA_UR.csv'

ur_usa = pd.read_csv(ur_usa_path + ur_usa_file,
                    skiprows=432)
ur_usa.columns = ['Date', 'Unemployment Rate']

ur_usa.head()


Out[381]:
Date Unemployment Rate
0 1984-01-01 8.0
1 1984-02-01 7.8
2 1984-03-01 7.8
3 1984-04-01 7.7
4 1984-05-01 7.4

In [936]:
USA = pd.merge(minwage_usa, cpi_usa1,
              how='right', on='Date')
USA = pd.merge(USA,  ur_usa,
              how='right', on='Date')

USA['Date'] = USA['Date'].str.rsplit('-', 1).str[0]

USA.head()


Out[936]:
Date $/hr CPI Minwage/CPI Ratio Unemployment Rate
0 1984-01 3.35 102.1 0.328110 8.0
1 1984-02 3.35 102.6 0.326511 7.8
2 1984-03 3.35 102.9 0.325559 7.8
3 1984-04 3.35 103.3 0.324298 7.7
4 1984-05 3.35 103.5 0.323671 7.4

In [974]:
USA.plot.scatter(x='Minwage/CPI Ratio', y='Unemployment Rate')


Out[974]:
<matplotlib.axes._subplots.AxesSubplot at 0x211b60560b8>

In [ ]:

Visually, there is a strong positive correlation between unemployment rate and the federal minimum wage.

This falls in line with the traditional argument that a higher mimimum wage is connected with unemployment.

At the moment we are looking at the minimum wage as defined by the Fair Labor Laws Act. Most states and cities have their own labor policies regarding the minimum wage. Let's examine if this is true for specific cities/regions, namely the four largest by population:

1) New York City

2) Los Angeles

3) Chicago

4) Houston

Just like the national data, we are starting at 1984.

The CPI data being used actually encompasses the city and surround region. For NYC, the data includes parts of New Jersey, for Los Angeles, the entire Southern California region, and likewise for Chicago and Houston.


In [759]:
minwage_ny_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\\Data'
minwage_ny_file = '\\Minwage_NY.csv'

minwage_ny = pd.read_csv(path + file, 
                             skiprows=543)

minwage_ny.columns = ['Date', '$/hr']

minwage_ny['$/hr'] = minwage_ny['$/hr'].astype(float)

cpi_ny_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
cpi_ny_file = '\\CPI_NY.csv'

cpi_ny = pd.read_csv(cpi_ny_path + cpi_ny_file,
                     )

cpi_ny.columns = ['Date', 'CPI']

cpi_ny['CPI'] = cpi_ny['CPI'].astype(float)

ur_ny_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
ur_ny_file = '\\NY_UR.csv'

ur_ny = pd.read_csv(ur_ny_path + ur_ny_file,
                   skiprows=96)

ur_ny.columns = ['Date', 'Unemployment Rate']

In [760]:
minwage_la_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\\Data'
minwage_la_file = '\\Minwage_CA.csv'

minwage_la = pd.read_csv(path + file, 
                             skiprows=543)

minwage_la.columns = ['Date', '$/hr']

minwage_la['$/hr'] = minwage_ca['$/hr'].astype(float)

cpi_ca_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
cpi_ca_file = '\\CPI_CA.csv'

cpi_la = pd.read_csv(cpi_ca_path + cpi_ca_file,
                    skiprows=829)

cpi_la.columns = ['Date', 'CPI']

cpi_la['CPI'] = cpi_la['CPI'].astype(float)

ur_ca_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
ur_ca_file = '\\CA_UR.csv'

ur_la = pd.read_csv(ur_ca_path + ur_ca_file,
                   skiprows=96)

ur_la.columns = ['Date', 'Unemployment Rate']

In [761]:
minwage_ch_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\\Data'
minwage_ch_file = '\\Minwage_IL.csv'

minwage_ch = pd.read_csv(path + file, 
                             skiprows=543)

minwage_ch.columns = ['Date', '$/hr']

minwage_ch['$/hr'] = minwage_ch['$/hr'].astype(float)

cpi_il_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
cpi_il_file = '\\CPI_IL.csv'

cpi_ch = pd.read_csv(cpi_il_path + cpi_il_file,
                    skiprows=829)

cpi_ch.columns = ['Date', 'CPI']

cpi_ch['CPI'] = cpi_ch['CPI'].astype(float)

ur_ch_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
ur_ch_file = '\\IL_UR.csv'

ur_ch = pd.read_csv(ur_ch_path + ur_ch_file,
                   skiprows=96)

ur_ch.columns = ['Date', 'Unemployment Rate']

In [841]:
minwage_hs_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\\Data'
minwage_hs_file = '\\Minwage_TX.csv'

minwage_hs = pd.read_csv(path + file, 
                             skiprows=543)

minwage_hs.columns = ['Date', '$/hr']

minwage_hs['$/hr'] = minwage_hs['$/hr'].astype(float)

cpi_hs_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
cpi_hs_file = '\\CPI_Houston.csv'

cpi_hs = pd.read_csv(cpi_ca_path + cpi_ca_file,
                    skiprows=829)

cpi_hs.columns = ['Date', 'CPI']

cpi_hs['CPI'] = cpi_hs['CPI'].astype(float)

ur_hs_path = 'C:\\Users\\appau_000\\Documents\\Data Bootcamp\Data'
ur_hs_file = '\\TX_UR.csv'

ur_hs = pd.read_csv(ur_hs_path + ur_hs_file,
                   skiprows=96)

ur_hs.columns = ['Date', 'Unemployment Rate']


Out[841]:
Date Unemployment Rate
0 1984-01-01 6.7
1 1984-02-01 6.5
2 1984-03-01 6.3
3 1984-04-01 6.2
4 1984-05-01 5.9

In [844]:
def createratio(minwage, cpi):
    ratio = (minwage['$/hr']/cpi['CPI'])*10
    ratio = ratio.to_frame()
    ratio.columns = ['Minwage/CPI Ratio']
    return ratio
    
ratio_ny = createratio(minwage_ny, cpi_ny)
ratio_ch = createratio(minwage_ch, cpi_ch)
ratio_la = createratio(minwage_la, cpi_la)
ratio_hs = createratio(minwage_hs, cpi_hs)

In [845]:
def consolidate(df, ratio, ur):
    
    df = pd.concat([ur, ratio], axis=1).fillna(0.0)
    
    df['Date'] = df['Date'].str.rsplit('-', 1).str[0]
    
    round(df['Minwage/CPI Ratio'], 3)
    
    df = df.replace(to_replace=[0.000000], value=[None])
    
    df = df.dropna()
    
    return df

NY = consolidate(NY, ratio_ny, ur_ny)
LA = consolidate(LA, ratio_la, ur_la)
CH = consolidate(CH, ratio_ch, ur_ch)
HS = consolidate(HS, ratio_hs, ur_hs)

In [915]:
fig, ax = plt.subplots(2, 2, sharex=True, sharey=True, figsize=(14,8))

NY.plot.scatter('Minwage/CPI Ratio','Unemployment Rate',
        ax=ax[0, 0],
        alpha=0.65,
        title='New York',
                color='r',
               fontsize=14)

LA.plot.scatter('Minwage/CPI Ratio','Unemployment Rate',
        ax=ax[0, 1],
        alpha=0.65,
        title='Los Angeles',
                color='blue',
               fontsize=14)

CH.plot.scatter('Minwage/CPI Ratio','Unemployment Rate',
        ax=ax[1, 0],
        alpha=0.65,
        title='Chicago',
                color='g',
               fontsize=14)

HS.plot.scatter('Minwage/CPI Ratio','Unemployment Rate',
        ax=ax[1, 1],
        alpha=0.65,
        title='Houston',
                color='y',
               fontsize=14,
               )

def modify(x, y, title):
    ax[x, y].set_title(title, fontsize=24)
    ax[x, y].set_ylabel('Unemployment Rate (%)', fontsize=18)
    ax[x, y].set_xlabel('Minwage/CPI Ratio', fontsize=18)
    
    return
    
modify(0,0,'New York')
modify(0,1,'Los Angeles')
modify(1,0,'Chicago')
modify(1,1,'Houston')


All four cities exhibit the same relationship with New York City showing a remarkably linear trend and Houston showing slightly less of a marked trend.


In [957]:
NY.describe()


Out[957]:
Unemployment Rate Minwage/CPI Ratio
count 66.000000 66.000000
mean 5.737879 0.193364
std 1.107980 0.056471
min 4.000000 0.126587
25% 4.700000 0.142601
50% 5.850000 0.183574
75% 6.700000 0.224281
max 7.500000 0.323047

In [959]:
HS.describe()


Out[959]:
Unemployment Rate Minwage/CPI Ratio
count 399.000000 399.000000
mean 6.154637 0.289015
std 1.278886 0.020884
min 4.000000 0.235594
25% 5.000000 0.274814
50% 6.200000 0.290518
75% 7.000000 0.303230
max 9.200000 0.331028

New York's Minwage/CPI Ratio has a significant range which implies large fluctuations in the cost of living relative to the minimum wage.

In contrast, Houston's ratio has been quite steady, showing a small range of about 0.1 between the min and max. The large range in historic unemployment rates may be due to various macroeconomic trends and factors.

Many studies have already been done on the relationship between the minimum wage and unemployment with very few definitively proving causation. These four cities have very different political climates, labor policies, living standards/expenses, and economic histories. Yet we see a consistent connection between the unemployment rate and the adjusted minimum wage at any given time.

Needless to mention, this is not intended to comment on the numerous ethical arguments surrounding minimum wage policies. Rather, the goal is to make more visible the relationship between the minimum wage and unemployment which are the foundations of many arguments against raising it.