Missouri Cole County Unemployment Rate

Synopsis

Cole County is a county in the central part of the U.S. state of Missouri.It has a population of apporximately 75,990 and an umployment rate of 4.4%. According to econport.org . a person is unemployed if he or she is willing and able to work, actively job searching, yet unable to find a job. Unemployment is an important issue that needs to be addressed. The objective of this project is to understand the unemployment scenario in Cole county from 2008 to 2013 and explore the causes.

In order to understand the unemployment senario, 6 months of data (2008 -2013) was analysed in two ways: 1. The employment data was cleaned and explored to understand the distribution of data. Unemployment rate at Cole county, Missouri was plotted across months for each year to obtain a facets grid which would help analyse the change in unemployment across years. 2. Additional data regarding Adjusted Index price for US was plotted and the correlation between the two was obtained and visulized for better understanding.

Packages

library(tidyverse) #This package is used for data representations and API design, it contains multiple packages including deplyr
library(RSocrata) #This package is used to Download or Upload 'Socrata' Data Sets
library(printr) #This package is used to print tidy tables in the rmarkdown file 
library(doBy) #This package is essential in order to use the summaryBy function for rolling up data 
library(prettydoc) #This package provides themes which can be applied to the rmarkdown file for better presentation
library(DT) #This package is used to to provide a condensed and scrollable HTML table

Codebook

The data is regarding unemployement rates in Missouri Cole County for the years 2008-2013 obtained from opendatanetworks.com link: https://data.mo.gov/Labor/Missouri-Cole-County-Unemployment-Data/95qa-jwbc . It was last updated on April 30th, 2013. The purpose of this dataset is to understand the variation of unemployment rates across 2008 to 2013 at Cole County, Missouri. It contains the following fields:

Data Preparation

The data was first cleaned in the following steps: 1. It was checked for missing values. 2. Fields which had constant values throughout the dataset were eliminated from the analysis (eg: Area type description, Area name, Region Centroid, Region Geometry). 3. The Period fields contained numbers from 1 to 12 which were replaced by names of the months. 4. The Annual rate was present only was 2010 and 2011 and hence was excluded from the analysis.

unemployment_missouri <- read.socrata("https://data.mo.gov/Labor/Missouri-Cole-County-Unemployment-Data/95qa-jwbc")
datatable(summary(unemployment_missouri))
sum(is.na(unemployment_missouri))
## [1] 0
cole_unemployment <-unemployment_missouri%>%as_tibble()%>%
                    subset(Period.Type != "Annual")%>%
                    mutate(Period=month.name[Period])%>%
                    arrange(Year)%>% 
                    select(-c(1:4,8,13,14))
datatable(cole_unemployment)

Exploratory Data Analysis and Summary

cole_unemployment$Period <- factor(cole_unemployment$Period,levels=month.name)
  cole_unemployment%>%arrange(Period)%>%
  mutate(Period=month.abb[Period])%>%
  ggplot()+
  geom_point(mapping=aes(x=Period,y=Unemployment.Rate),stat="identity")+
  labs(x='Month', y= 'Unemployment rate') +
  facet_wrap(~Year)+ggtitle(paste('Missouri Cole County- Unemployment Rate'))

The above graphs were plotted in the form of a matrix for easy comparison of unemployment rates accross differents months through 2008 to 2013.It was observed that the unemployment rate was at it peaks for the years 2009 and 2010 which was the period of great recession in the united states.The unemployment rate began to rise from mid 2008 and continued to rise till the mid 2011 during which there was an increase in the demand to supply ratio leading to decrease in unemployment in Cole County.

  data_index <- read.csv("http://chart.finance.yahoo.com/table.csv?s=^GSPC&a=0&b=1&c=2008&d=11&e=31&f=2013&g=d")
  data_index$Date = format(as.Date(data_index$Date),format="%B-%Y")
  data_index_month_year = summaryBy(Adj.Close~Date,data=data_index,FUN=mean)
  
  cole_unemployment$Date = paste(cole_unemployment$Period,cole_unemployment$Year,sep="-")
  cole_unemployment$employment_rate = cole_unemployment$Employment/cole_unemployment$Laborforce
  
  data_cor = merge(data_index_month_year[,c("Date","Adj.Close.mean")],cole_unemployment[,c("Date","employment_rate")], by="Date")
  data_cor = data_cor[!duplicated(data_cor$Date),]
  datatable(data_cor)
  data_cor %>% ggplot()+
  geom_point(mapping=aes(x=employment_rate,y=Adj.Close.mean))+
  labs(x='Employment Rate ', y= 'Adjusted index price') +ggtitle(paste('Missouri Cole County- Unemployment Rate v/s Adjusted Index Price'))

S&P500 index data was obtained from yahoo finance https://finance.yahoo.com/quote/%5EGSPC/history?p=%5EGSPC. S&P 500 index can be used as an indicator to understand the economic condition of the country.Monthly average price was calculated and used for our analysis since it has been ammended to include any distribution and corporate actions that occured anytime prior to nexts days open.We expect economic conditions to affect employement rate and it is evident from the scatter plot that they have a slight correlation whose values can be obtained from the table above, which indicates that a country’s economic condition influences the employment rate at Cole County in Missouri.