Introduction

Understanding trends in industry data is imperative in determining economic development approaches and strategies to support the region. This analysis looks at the industry data for Los Angeles County utilizing data from the Census Bureau’s Quarterly Workforce Indicators

library(tidycensus)
library(sf)
library(tidyverse)
library(sf)
library(lubridate)
library(tigris)
library(gganimate)
library(riem)
library(gridExtra)
library(knitr)
library(kableExtra)
library(mapview)
library(tidycensus)
library(ggcorrplot)
library(RColorBrewer)
library(stargazer)
library(ggplot2)
theme_set(theme_bw())

if(!require(pacman)){install.packages("pacman"); library(pacman)}
p_load(tidyverse, here, janitor)

options(scipen=999)

setwd("~/Desktop/Coding/CPLN_620")


palette_con <- c("#8ecae6","#219ebc","#023047","#ffb703","#fb8500")

Data Wrangling

The following operations wrangles industry data for both Los Angeles County and the United States. Interested in 2011 and 2021, the employment growth, earnings, and location quotient is calculated for both years as well as the change in employment growth and earnings.

qwi_msa <- read_csv(here::here("~/Desktop/Coding/CPLN_620/Business Structure Lab/losangeles.csv"))
qwi_msa <- clean_names(qwi_msa, case = "snake")

qwi_annual <- qwi_msa %>%
  group_by(industry_label_value, year) %>%
  summarise(avg_emp = mean(emp_total, na.rm = TRUE),
            avg_earnings = mean(earn_s, na.rm = TRUE))

qwi_tot_wide <- qwi_annual %>%
  pivot_wider( names_from = year,
  values_from = c("avg_emp", "avg_earnings"),
  values_fill = 0)

qwi_tot_wide <- qwi_tot_wide %>%
  mutate(emp_growth = (avg_emp_2021 - avg_emp_2011)/avg_emp_2011,
  pay_growth = (avg_earnings_2021 - avg_earnings_2011)/avg_earnings_2011)
qwi_national <- read_csv(here::here("~/Desktop/Coding/CPLN_620/Business Structure Lab/national.csv"))
qwi_national <- qwi_national %>% clean_names(case = "snake")

qwi_nat_annual <- qwi_national %>%
  group_by(industry_label_value, geography_label_value, year) %>%
  summarise(avg_emp = mean(emp_total, na.rm = TRUE),
            avg_earnings = mean(earn_s, na.rm = TRUE)) %>%
ungroup() %>%
group_by(industry_label_value, year) %>%
summarise(avg_emp = sum(avg_emp, na.rm = TRUE),
avg_earnings = sum(avg_earnings, na.rm = TRUE))

qwi_nat_annual_wide <- qwi_nat_annual %>%
  pivot_wider( names_from = year,
  values_from = c("avg_emp", "avg_earnings"),
  values_fill = 0)

qwi_annual_wide1 <- qwi_tot_wide %>%
  inner_join(qwi_nat_annual_wide, by = "industry_label_value",
  suffix = c("_msa", "_national"))

qwi_annual_wide1 <- qwi_annual_wide1 %>%
  ungroup() %>%
  mutate(lq_2011 = (avg_emp_2011_msa/sum(avg_emp_2011_msa, na.rm = TRUE))/(avg_emp_2011_national/sum(avg_emp_2011_national,na.rm=TRUE)),
         lq_2021 = (avg_emp_2021_msa/sum(avg_emp_2021_msa, na.rm = TRUE))/(avg_emp_2021_national/sum(avg_emp_2021_national,na.rm=TRUE)))

Industry Results

The industry data for 2011 and 2021 now allows for further analysis on the variables of interest. Within the economic development field, understanding growth, industry concentration, and earnings can support in determining how to create effective solutions that can address areas for improvement.

Growth

The top five industries that have experienced employment growth includes: Social Assistance, Couriers and Messengers, Nonstore Retailers, Data Processing, Hosting, and Related Services and Administration of Human Resource Programs.

The bottom five industries that have experienced an employment decline includes: Wholesale Electronic Markets and Agents and Brokers, Forestry and Logging, Oil and Gas Extraction, Private Households, and Rail Transportation.

la_top5 <- qwi_tot_wide[order(qwi_tot_wide$emp_growth,decreasing=T)[1:5],]
la_btm5 <- qwi_tot_wide[order(qwi_tot_wide$emp_growth,decreasing=F)[1:5],]

la_5 <- rbind(la_top5,la_btm5)

la_5 %>% 
  summarize(Employment_Growth = emp_growth)%>%
    arrange(desc(Employment_Growth)) %>%
  kable(title = "Top 5 Fastest Growing Industries", caption = "Top 5 Fastest Growing and Most Declining Industries in Los Angeles County") %>%
  kable_styling("striped",full_width = F) %>%
  row_spec(6:10, background = '#ffb703') %>%
  row_spec(0, bold=TRUE) %>%
  column_spec(2, bold=TRUE)
Top 5 Fastest Growing and Most Declining Industries in Los Angeles County
industry_label_value Employment_Growth
Social Assistance 3.0429678
Couriers and Messengers 2.3676192
Nonstore Retailers 1.2502398
Data Processing, Hosting, and Related Services 1.0168348
Administration of Human Resource Programs 1.0067989
Wholesale Electronic Markets and Agents and Brokers -0.5952766
Forestry and Logging -0.8270333
Oil and Gas Extraction -0.8370458
Private Households -0.9129372
Rail Transportation -1.0000000

The following diverging chart provides a more visually appealing method of displaying the top five and bottom five industries that are experienced employment growth/decline.

theme_set(theme_bw())  
la_5$`Industry` <- rownames(la_5)  # create new column for car names

la_5$score <- round(la_5$emp_growth, 2)  # compute normalized mpg

la_5 <-
  la_5 %>% 
  mutate(score_norm = case_when(emp_growth < 0 ~ "below",
                          TRUE ~ "above"))

la_5 <- la_5[order(la_5$score_norm), ]  # sort

la_5$`Industry` <- factor(la_5$`Industry`, levels = la_5$`Industry`)  # convert to factor to retain sorted order in plo

ggplot(la_5, aes(x=reorder(industry_label_value,score), y=score, label=score)) + 
  geom_bar(stat='identity', aes(fill=score_norm), width=.5)  +
  scale_fill_manual(name="Employment Growth", 
                    labels = c("Above Average", "Below Average"), 
                    values = c("above"="#023047", "below"="#ffb703")) + 
  labs(subtitle="Los Angeles County", 
       title= "Top 5 Fastest Growing and Most Declining Industries",
       x = "Industry", y = "Score") + 
  coord_flip()

The data interestingly suggests that in Los Angeles County, the industries that have experienced employment growth are ones that may seem least expected. Notorious for the entertainment, engineering, health, and software industries, the industries with employment growth are ones that can be categorized as service and public service oriented industries with the exception of nonstore retailers.

Concentration

The five industries with the highest location quotient includes: Motion Picture and Sound Recording Industries, Apparel Manufacturing, Performing Arts, Spectator Sports, and Related Industries, Broadcasting (except Internet) and, Support Activities for Transportation.

The five industries with the lowest location quotient includes: National Security and International Affairs, Rail Transportation, Forestry and Logging, Animal Production and Aquaculture, Support Activities for Agriculture and Forestry

la_contop5 <- qwi_annual_wide1[order(qwi_annual_wide1$lq_2021,decreasing=T)[1:5],]
la_conbtm5 <- qwi_annual_wide1[order(qwi_annual_wide1$lq_2021,decreasing=F)[1:5],]

la_con5 <- rbind(la_contop5,la_conbtm5) %>%
  dplyr::select(industry_label_value,lq_2021)

la_con5 %>% 
  kable(title = "Top 5 Fastest Growing Industries", caption = "Top 5 Most and Least Concentrated Industries in Los Angeles County") %>%
  kable_styling("striped",full_width = F) %>%
  row_spec(6:10, background = '#ffb703') %>%
  row_spec(0, bold=TRUE) %>%
  column_spec(2, bold=TRUE)
Top 5 Most and Least Concentrated Industries in Los Angeles County
industry_label_value lq_2021
Motion Picture and Sound Recording Industries 14.2055261
Apparel Manufacturing 6.1082023
Performing Arts, Spectator Sports, and Related Industries 3.2409356
Broadcasting (except Internet) 2.6646486
Support Activities for Transportation 2.2960682
National Security and International Affairs 0.0000000
Rail Transportation 0.0000000
Forestry and Logging 0.0030094
Animal Production and Aquaculture 0.0346731
Support Activities for Agriculture and Forestry 0.0623533

Interested in the industries with the highest location quotients, the following pie chart provides a more clear visual of the dominance that the Motion Picture and Sound Recording Industries has in the region.

ggplot(la_contop5, aes(x="", y=lq_2021, fill=industry_label_value)) +
  geom_bar(stat="identity", width=1, color="white") +
  coord_polar("y", start=0) +
  theme_void() +
  scale_fill_manual(values = palette_con,
                    name = "Industry") +
  labs(title = "Share of Top 5 Industries Concentration Score", caption = "Los Angeles County")

One point of interest within the data analysis on the concentration of industries is that Support Activities for Transportation is in the top five, while Rail Transportation is in the bottom five.

Earnings

The top 5 industries that have experienced earnings growth includes: Private Households, Other Information Services, Electronics and Appliance Stores, Data Processing, Hosting, and Related Services, Lessors of Nonfinancial Intangible Assets (except Copyrighted Works)

The bottom 5 industries that have experienced an earnings decrease includes: Support Activities for Mining, Social Assistance, Oil and Gas Extraction, National Security and International Affairs, Rail Transportation

la_top5pay <- qwi_tot_wide[order(qwi_tot_wide$pay_growth,decreasing=T)[1:5],]
la_btm5pay <- qwi_tot_wide[order(qwi_tot_wide$pay_growth,decreasing=F)[1:5],]

la_5pay <- rbind(la_top5pay,la_btm5pay)

la_5pay %>% 
  summarize(Payment = pay_growth)%>%
    arrange(desc(Payment)) %>%
  kable(title = "Top 5 Fastest Growing Industries", caption = "Top 5 Highest and Lowest Paying Industries in Los Angeles County") %>%
  kable_styling("striped",full_width = F) %>%
  row_spec(6:10, background = '#ffb703') %>%
  row_spec(0, bold=TRUE) %>%
  column_spec(2, bold=TRUE)
Top 5 Highest and Lowest Paying Industries in Los Angeles County
industry_label_value Payment
Private Households 2.6298544
Other Information Services 1.7477681
Electronics and Appliance Stores 0.9632628
Data Processing, Hosting, and Related Services 0.9526043
Lessors of Nonfinancial Intangible Assets (except Copyrighted Works) 0.8970999
Support Activities for Mining -0.1815141
Social Assistance -0.1985866
Oil and Gas Extraction -0.3393705
National Security and International Affairs -1.0000000
Rail Transportation -1.0000000