General trends
# search database for a car production series
search_ls <- fredr_series_search_text("auto manufacturing employee")
search_ls$title[1:40]
## [1] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Michigan"
## [2] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Michigan"
## [3] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Michigan"
## [4] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Michigan"
## [5] "All Employees: Durable Goods: Motor Vehicle Manufacturing in Michigan"
## [6] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Detroit-Warren-Dearborn, MI (MSA)"
## [7] "All Employees: Durable Goods: Motor Vehicle Manufacturing in California"
## [8] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Detroit-Warren-Dearborn, MI (MSA)"
## [9] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Ohio"
## [10] "Full-time and part-time employees: Domestic private industries: Manufacturing: Durable goods: Motor vehicles and equipment"
## [11] "Wage and salary accruals per full-time equivalent employee: Domestic private industries: Manufacturing: Durable goods: Motor vehicles and equipment"
## [12] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Ohio"
## [13] "Full-time and part-time employees: Domestic private industries: Manufacturing: Durable goods: Motor vehicles and equipment"
## [14] "Full-time and part-time employees: Domestic private industries: Manufacturing: Durable goods: Motor vehicles and equipment"
## [15] "Wage and salary accruals per full-time equivalent employee: Domestic private industries: Manufacturing: Durable goods: Motor vehicles and equipment"
## [16] "Wage and salary accruals per full-time equivalent employee: Domestic private industries: Manufacturing: Durable goods: Motor vehicles and equipment"
## [17] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Texas"
## [18] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Texas"
## [19] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Alabama"
## [20] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Alabama"
## [21] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Kentucky"
## [22] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Kentucky"
## [23] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in California"
## [24] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in California"
## [25] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Detroit-Dearborn-Livonia, MI (MD)"
## [26] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Detroit-Dearborn-Livonia, MI (MD)"
## [27] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Missouri"
## [28] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Missouri"
## [29] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Manufacturing in Warren-Troy-Farmington Hills, MI (MD)"
## [30] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Ohio"
## [31] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Ohio"
## [32] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Indiana"
## [33] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Indiana"
## [34] "Average Hourly Earnings of Production Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Michigan"
## [35] "Average Hourly Earnings of Production Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Michigan"
## [36] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Flint, MI (MSA)"
## [37] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Flint, MI (MSA)"
## [38] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Mississippi"
## [39] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Mississippi"
## [40] "All Employees: Manufacturing: Durable Goods: Motor Vehicle Parts Manufacturing in Kentucky"
- TOTALSA : Total Vehicle Sales
indicator <-fredr_series_observations(series_id = "TOTALSA",
observation_start = as.Date("2016-01-01"))
tail(indicator[,-2]) %>% kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
column_spec(2, T, color = "red" )
date
|
value
|
2020-04-01
|
9.1
|
2020-05-01
|
12.4
|
2020-06-01
|
13.3
|
2020-07-01
|
15.0
|
2020-08-01
|
15.6
|
2020-09-01
|
16.9
|
indicator %>%
ggplot(aes(x = date, y = value)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(color = "red4",size=.8) +
labs(
y = "Millions of units",
x = "Monthly",
title = "Total Vehicle Sales",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")) +
theme_economist()

DAUPSA : Domestic car production
indicator <-fredr_series_observations(series_id = "DAUPSA",
observation_start = as.Date("2016-01-01"))
tail(indicator[,-2]) %>% kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
column_spec(2, T, color = "red" )
date
|
value
|
2020-04-01
|
1.7
|
2020-05-01
|
46.5
|
2020-06-01
|
138.1
|
2020-07-01
|
225.2
|
2020-08-01
|
194.9
|
2020-09-01
|
198.5
|
indicator %>%
ggplot(aes(x = date, y = value)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(color = "red4",size=.8) +
labs(
y = "thousands of units",
x = "Monthly",
title = "Domestic Automobile Production (DAUPSA)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")) +
theme_economist()

Motor Vehicle Retail Sales: Domestic Autos (DAUTONSA)
indicator <-fredr_series_observations(series_id = "DAUTONSA",
observation_start = as.Date("2016-01-01"))
tail(indicator[,-2]) %>% kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
column_spec(2, T, color = "red" )
date
|
value
|
2020-04-01
|
126
|
2020-05-01
|
183
|
2020-06-01
|
179
|
2020-07-01
|
221
|
2020-08-01
|
234
|
2020-09-01
|
235
|
indicator %>%
ggplot(aes(x = date, y = value)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(color = "red4",size=.8) +
labs(
y = "Thousands of units",
x = "Monthly",
title = "Retail Sales: Domestic Autos",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")) +
theme_economist()

Motor Vehicle Retail Sales: Foreign Autos (FAUTONSA)
indicator <-fredr_series_observations(series_id = "FAUTONSA",
observation_start = as.Date("2016-01-01"))
tail(indicator[,-2]) %>% kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
column_spec(2, T, color = "red" )
date
|
value
|
2020-04-01
|
40
|
2020-05-01
|
75
|
2020-06-01
|
72
|
2020-07-01
|
73
|
2020-08-01
|
70
|
2020-09-01
|
71
|
indicator %>%
ggplot(aes(x = date, y = value)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(color = "red4",size=.8) +
labs(
y = "Thousands of units",
x = "Monthly",
title = "Retail Sales: Foreign Autos",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")) +
theme_economist()

Domestic Auto Inventories (AUINSA)
indicator <-fredr_series_observations(series_id = "AUINSA",
observation_start = as.Date("2016-01-01"))
tail(indicator[,-2]) %>% kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
column_spec(2, T, color = "red" )
date
|
value
|
2020-04-01
|
462
|
2020-05-01
|
361
|
2020-06-01
|
368
|
2020-07-01
|
441
|
2020-08-01
|
461
|
2020-09-01
|
456
|
indicator %>%
ggplot(aes(x = date, y = value)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(color = "red4",size=.8) +
labs(
y = "Thousands of units",
x = "Monthly",
title = "Domestic Auto Inventories (AUINSA)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")) +
theme_economist()

Motor Vehicle Retail Sales: Heavy Weight Trucks (HTRUCKSNSA)
indicator <-fredr_series_observations(series_id = "HTRUCKSNSA",
observation_start = as.Date("2016-01-01"))
tail(indicator[,-2]) %>% kable() %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
column_spec(2, T, color = "red" )
date
|
value
|
2020-04-01
|
28
|
2020-05-01
|
24
|
2020-06-01
|
31
|
2020-07-01
|
32
|
2020-08-01
|
37
|
2020-09-01
|
39
|
indicator %>%
ggplot(aes(x = date, y = value)) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(color = "red4",size=.8) +
labs(
y = "Thousands of units",
x = "Monthly",
title = "Heavy Weight Truck Sales (HTRUCKSNSA)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(indicator$date)} through {max(indicator$date)}")) +
theme_economist()

Employment
- All Employees: Durable Goods: Motor Vehicle Manufacturing in Michigan (SMU26000003133610001)
- All Employees: Durable Goods: Motor Vehicle Manufacturing in Alabama (SMU01000003133610001)
- All Employees: Motor Vehicle Manufacturing in Kentucky (SMU21000003133610001)
- All Employees: Motor Vehicle Manufacturing in Texas (SMU48000003133610001)
michigan <-fredr_series_observations(series_id = "SMU26000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(michigan) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Michigan (SMU26000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(michigan$date)} through {max(michigan$date)}"))+
theme_economist()

#-----------------------------
al <-fredr_series_observations(series_id = "SMU01000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(al) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Alabama (SMU01000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(al$date)} through {max(al$date)}"))+
theme_economist()

#-----------------------------
ky <-fredr_series_observations(series_id = "SMU21000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(ky) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Kentucky (SMU21000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(ky$date)} through {max(ky$date)}"))+
theme_economist()

# Texas = SMU48000003133610001
tx <-fredr_series_observations(series_id = "SMU48000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(tx) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Texas (SMU48000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(tx$date)} through {max(tx$date)}"))+
theme_economist()

# California = SMU06000003133610001
ca <-fredr_series_observations(series_id = "SMU06000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(ca) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Califoria (SMU06000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(ca$date)} through {max(ca$date)}"))+
theme_economist()

# Ohio = SMU39000003133610001
oh <-fredr_series_observations(series_id = "SMU39000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(oh) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Ohio (SMU39000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(oh$date)} through {max(oh$date)}"))+
theme_economist()

# Missouri = SMU29000003133610001
mo <-fredr_series_observations(series_id = "SMU29000003133610001",observation_start = as.Date("2018-01-01"))
# plotting data
ggplot(mo) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Thousands of workers",
title = "All Employees: Motor Vehicle Manufacturing in Missouri (SMU29000003133610001)",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(mo$date)} through {max(mo$date)}"))+
theme_economist()

#-------------------
all <- oh
colnames(all)[3] <-"Ohio"
all$Texas <- tx$value
all$California <- ca$value
all$Kentucky <- ky$value
all$Alabama <- al$value
all$Missouri <- mo$value
Domestic sales of imported new cars, seasonally adjusted and in billions of USD (B149RC1Q027SBEA)
- AB63RC1Q027SBEA Motor vehicle output: Net exports
- Billions of Dollars, Seasonally Adjusted Annual Rate
- Quarterly
import <-fredr_series_observations(series_id = "B149RC1Q027SBEA",observation_start = as.Date("2015-01-01"))
# plotting data
ggplot(import) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value), color = "red") +
labs(x = "Time",y = "Billions of Dollars",
title = "Domestic sales of imported new cars",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("Monthly from {min(import$date)} through {max(import$date)}"))+
theme_economist()

#-------
Personal consumption expenditures: New autos (A136RC1Q027SBEA)
- Units:Billions of Dollars,Seasonally Adjusted Annual Rate
- Frequency: quarterly
sale <-fredr_series_observations(series_id = "A136RC1Q027SBEA",
observation_start = as.Date("2015-01-01"))
# convert series list to dataframe
sale_df <- do.call(cbind.data.frame, sale)
# plotting data
ggplot(sale_df) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value),
color = "red") +
ggtitle("Personal Expenditures for New Cars") +
labs(x = "Quarterly",y = "Billions of Dollars",
title = "Personal Expenditures for New Cars",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(sale$date)} through {max(sale$date)}"))+
theme_economist()

Personal consumption expenditures: Net purchases of used autos (A137RC1Q027SBEA)
used <-fredr_series_observations(series_id = "A137RC1Q027SBEA",
observation_start = as.Date("2015-01-01"))
# convert series list to dataframe
used_df <- do.call(cbind.data.frame, used)
# plotting data
ggplot(used_df) +
geom_rect(aes(xmin= dmy('01-01-2020'), xmax=dmy('01-09-2020'), ymin = -Inf, ymax = Inf),
fill = "lightyellow", alpha = 0.02)+
geom_line(mapping = aes(x=date,y=value),
color = "red") +
labs(x = "Quarterly",y = "Billions of Dollars",
title = "Net purchases of used autos",
caption = "Data source: FRED St. Louis Federal Reserve \nIllustration by @JoeLongSanDiego",
subtitle = str_glue("From {min(used$date)} through {max(used$date)}"))+
theme_economist()
