Labor force data are restricted to people 16 years of age and older, who currently reside in 1 of the 50 states or the District of Columbia, who do not reside in institutions (e.g., penal and mental facilities, homes for the aged), and who are not on active duty in the Armed Forces.
This rate is also defined as the U-3 measure of labor underutilization.
The series comes from the ‘Current Population Survey (Household Survey)’
indicator <-fredr_series_observations(series_id = "ICSA",
observation_start = as.Date("2019-01-01"))
indicator %>% ggplot() +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-11-2020'), ymin = -Inf, ymax = Inf),
fill = "lightgrey", alpha = 0.025)+
geom_line(mapping = aes(x=date,y=value),color="red",size=1) +
labs(title = "Initial Unemployment Claims (ICSA)",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}"),
x="Weekly", y="Numbers",
caption = "Data source: FRED St. Louis Federal Reserve\nIllustration by @JoeLongSanDiego")+
theme_economist()
credit <-
"DRCCLACBS" %>%
tq_get(get = "economic.data",
from = "1980-01-01") %>%
rename(rate = price)
credit %>%
ggplot(aes(x = date, y = rate)) +
geom_line(color = "blue2",size=1) +
labs(
x = "Date",
y = "Percentage",
title = "Delinquency Rate on Credit Card ",
subtitle = str_glue("Quarterly from {min(credit$date)} through {max(credit$date)}")
) +
theme_economist()+
scale_y_continuous(labels = scales::comma)
reo <-
"DRSFRMACBS" %>%
tq_get(get = "economic.data",
from = "2000-01-01") %>%
rename(rate = price)
reo %>%
ggplot(aes(x = date, y = rate)) +
geom_line(color = "blue",size=1) +
labs(
x = "Quarterly",
y = "Rate",
title = "Delinquency Rate on SFR Mortgages",
subtitle = str_glue("Quarterly from {min(reo$date)} through {max(reo$date)}")
) +
theme_economist() +
scale_y_continuous(labels = scales::comma)
Getting economic data from tidyquant package
ca_claims <-
"CAICLAIMS" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
ca_claims %>%
ggplot(aes(x = date, y = claims)) +
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "",
title = "Unemployment Claims _ California",
subtitle = str_glue("Weekly from {min(ca_claims$date)} through {max(ca_claims$date)}")
) +
theme_economist() +
scale_y_continuous(labels = scales::comma)
indicator <-
"CARIVE5URN" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
indicator %>%
ggplot(aes(x = date, y = claims)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-10-2020'), ymin = -Inf, ymax = Inf),
fill = "white", alpha = 0.03)+
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "Rate",
title = "Unemployment Rate _ Riverside County",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")
) +
theme_economist()
indicator <-
"CASANB1URN" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
indicator %>%
ggplot(aes(x = date, y = claims)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-10-2020'), ymin = -Inf, ymax = Inf),
fill = "white", alpha = 0.03)+
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "Rate",
title = "Unemployment Rate _ San Bernardino County",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")
) +
theme_economist()
indicator <-
"CASAND5URN" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
indicator %>%
ggplot(aes(x = date, y = claims)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-10-2020'), ymin = -Inf, ymax = Inf),
fill = "white", alpha = 0.03)+
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "Rate",
title = "Unemployment Rate _ San Diego County",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")
) +
theme_economist()
indicator <-
"CALOSA7URN" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
indicator %>%
ggplot(aes(x = date, y = claims)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-10-2020'), ymin = -Inf, ymax = Inf),
fill = "white", alpha = 0.03)+
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "Rate",
title = "Unemployment Rate _ Los Angeles County",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")
) +
theme_economist()
library(knitr)
library(kableExtra)
tail(ca_claims) %>%
kable() %>%
kable_styling()
symbol | date | claims |
---|---|---|
CAICLAIMS | 2020-09-12 | 226004 |
CAICLAIMS | 2020-09-19 | 226179 |
CAICLAIMS | 2020-09-26 | 171220 |
CAICLAIMS | 2020-10-03 | 148213 |
CAICLAIMS | 2020-10-10 | 176083 |
CAICLAIMS | 2020-10-17 | 159876 |
ca_claims<- ca_claims %>%
mutate(
year = year(date),
month = month(date, label = T, abbr = T),
week = week(date))
ca_month <- ca_claims %>%
group_by(year,month)%>%
summarise(Ave_count =sum(claims))
## `summarise()` regrouping output by 'year' (override with `.groups` argument)
ca_claims
## # A tibble: 94 x 6
## symbol date claims year month week
## <chr> <date> <int> <dbl> <ord> <dbl>
## 1 CAICLAIMS 2019-01-05 38536 2019 Jan 1
## 2 CAICLAIMS 2019-01-12 53519 2019 Jan 2
## 3 CAICLAIMS 2019-01-19 48844 2019 Jan 3
## 4 CAICLAIMS 2019-01-26 56886 2019 Jan 4
## 5 CAICLAIMS 2019-02-02 48904 2019 Feb 5
## 6 CAICLAIMS 2019-02-09 44850 2019 Feb 6
## 7 CAICLAIMS 2019-02-16 43516 2019 Feb 7
## 8 CAICLAIMS 2019-02-23 34449 2019 Feb 8
## 9 CAICLAIMS 2019-03-02 41085 2019 Mar 9
## 10 CAICLAIMS 2019-03-09 40896 2019 Mar 10
## # ... with 84 more rows
ggplot(data=ca_claims,aes(x=date,y = claims,fill=month)) +
geom_bar(stat = "identity")+
labs(
title = "Weekly Unemployment Claims in California",
subtitle = str_glue("{min(ca_claims$date)} through {max(ca_claims$date)}"),
caption = "Illustration by Joe Long",
y = "",
x = ""
)
ggplot(data=ca_month,aes(x=reorder(month,year),y = Ave_count,fill=month)) +
geom_bar(stat = "identity")+
labs(
title = "Monthly Count of New Unemployment Claims in California",
subtitle = "",
caption = "Illustration by Joe Long",
y = "",
x = ""
)
par(mfrow=c(2,1))
sdurn <-
"CASAND5URN" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
sdurn %>%
ggplot(aes(x = date, y = claims)) +
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "",
title = "Unemployment Rate _ San Diego",
subtitle = str_glue("From {min(sdurn$date)} through {max(sdurn$date)}")
) +
theme_economist() +
scale_y_continuous(labels = scales::comma)
sdun <-
"LAUCN060730000000004" %>%
tq_get(get = "economic.data",
from = "2019-01-01") %>%
rename(claims = price)
sdun %>%
ggplot(aes(x = date, y = claims)) +
geom_line(color = "blue",size=1) +
labs(
x = "",
y = "",
title = "Unemployment Population _ San Diego",
subtitle = str_glue("From {min(sdun$date)} through {max(sdun$date)}")
) +
theme_economist()+
scale_y_continuous(labels = scales::comma)
Crude Oil Prices: West Texas Intermediate (WTI) - Cushing, Oklahoma (DCOILWTICO)
library(quantmod)
library(ggplot2)
wti <- tq_get("DCOILWTICO", get = "economic.data", from = "2020-01-01")
ggplot(wti, aes(x = date, y = price)) + geom_line(color = "darkblue",size=1) +
labs(
x = "Date",
y = "Dollars",
subtitle = str_glue("{min(wti$date)} through {max(wti$date)}"),
title = "West Texas Intermediate (WTI) _ DCOILWTICO",
caption = "Data source: FRED St. Louis Federal Reserve\nIllustration by Joe Long"
) +
theme_economist() +
theme(plot.title = element_text(color="blue")) +
theme(axis.text.x = element_text(angle = 90, hjust = 1))+
scale_x_date(date_breaks = "2 months")
## Warning: Removed 1 row(s) containing missing values (geom_path).