Mapping State Unemplo Data
knitr::opts_chunk$set(echo = TRUE,fig.width = 10,fig.height = 6)
library(blscrapeR)
library(tidyverse)
## -- Attaching packages ----------------------------------------------------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2 v purrr 0.3.4
## v tibble 3.0.6 v dplyr 1.0.2
## v tidyr 1.1.0 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.5.0
## -- Conflicts -------------------------------------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
##
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
##
## date
library(ggthemes)
library(blscrapeR)
library(kableExtra)
##
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
##
## group_rows
options(scipen = 999)
options(digits=4)
df <- get_bls_county("December 2019", stateName="California")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
# Map the unemployment rate from data set.
map_bls(map_data = df, fill_rate = "unemployed_rate", stateName = "California",
labtitle = "Unemployment Rate _ Dec 2019 _ California")

df <- get_bls_county(stateName = "California")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "California") +
labs(title= "Unemployment rate in California_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "Texas")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Texas") +
labs(title= "Unemployment rate in Texas_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "Arizona")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Arizona") +
labs(title= "Unemployment rate in Arizona_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "Florida")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Florida") +
labs(title= "Unemployment rate in Florida_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "Georgia")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Georgia") +
labs(title= "Unemployment rate in Georgia_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "Wisconsin")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Wisconsin") +
labs(title= "Unemployment rate in Wisconsin_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "Alabama")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Alabama") +
labs(title= "Unemployment rate in Alabama_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

# Map the unemployment rate for Florida and Alabama.
df <- get_bls_county(stateName = "Ohio")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "Ohio") +
labs(title= "Unemployment rate in Ohio_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "North Carolina")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "North Carolina") +
labs(title= "Unemployment rate in North Carolina_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")

df <- get_bls_county(stateName = "South Carolina")
df$unemployed_rate <- as.numeric(df$unemployed_rate)
map_bls(map_data=df, fill_rate = "unemployed_rate",
stateName = "South Carolina") +
labs(title= "Unemployment rate in South Carolina_ December 2020",caption = "Data source= BLS\nIllustration by Joe Long")
