3  Results

Code
suppressPackageStartupMessages(
suppressWarnings({
  library(ggplot2)
  library(tidyverse)
  library(gridExtra)
  library(dplyr)
  library(plotly)
  library(janitor)
}))

folder_path <- "./data/"
folder_path_other <- './data_other/'


hires <- read.csv(paste0(folder_path, "Hires.csv"))
layoffs_discharges <- read.csv(paste0(folder_path, "LayoffsDischarges.csv"))
industry <- read.csv(paste0(folder_path, "industry.csv"))
unemployed_per_job_opening_ratio <- read.csv(paste0(folder_path, "UnemployedPerJobOpeningRatio.csv"))
total_separations <- read.csv(paste0(folder_path, "TotalSeperations.csv"))
quits <- read.csv(paste0(folder_path, "Quits.csv"))
job_openings <- read.csv(paste0(folder_path, "JobOpenings.csv"))
series <- read.csv(paste0(folder_path, "series.csv"))

all_item <- read.csv(paste0(folder_path_other, "AllItems.csv"))
dataelement <- read.csv(paste0(folder_path_other, "dataelement.csv"))
sizeclass <- read.csv(paste0(folder_path_other, "sizeclass.csv"))
state <- read.csv(paste0(folder_path_other, "state.csv"))


all_item <- all_item %>%
  mutate(
    value = as.numeric(value),
    series_id = str_trim(series_id),
    date = as.Date(paste(substr(period,2,3),"01",year,sep="/"),"%m/%d/%Y")
  )

series<-series %>%
  clean_names %>%
  mutate_all(str_trim)

dataelement<-dataelement %>%
  clean_names %>%
  mutate_all(str_trim)

sizeclass<-sizeclass %>%
  clean_names %>%
  mutate_all(str_trim)

industry<-industry %>%
  clean_names %>%
  mutate_all(str_trim)

state<-state %>%
  clean_names %>%
  mutate_all(str_trim)

jolts <- all_item %>%
  inner_join(series, by = c("series_id")) %>%
  inner_join(dataelement, by = c("dataelement_code"),suffix = c(".series", ".data_element")) %>%
  inner_join(industry, by = c("industry_code"),suffix = c(".x", ".industry_code")) %>%
  inner_join(sizeclass, by = "sizeclass_code") %>%
  inner_join(state, by="state_code")

jolts <- jolts %>%
  mutate(
    industry_text = case_when(
      industry_text == "Professional and business services" ~ "Business services",
      industry_text == "Education and health services" ~ "Education & health",
      industry_text == "Leisure and hospitality" ~ "Leisure & hospitality",
      TRUE ~ industry_text
    )
  )

3.1 Overall Market state

Code
jolts_filtered <- jolts %>%
  filter(period != "M13", seasonal == "S", ratelevel_code == "L") %>%
  filter(display_level.industry_code == 2) %>%
  filter(dataelement_text != "Layoffs and discharges", dataelement_text != "Other separations") %>%
  filter(date == max(date))

plot1 <- jolts_filtered %>%
  ggplot(aes(industry_text, value)) +
  geom_bar(stat = "identity") +
  coord_flip() +
  facet_wrap(~ dataelement_text, ncol = 2) +
  labs(title = "Industry Data (Current 2023 Market)", x = "Industry", y = "Value") +
  theme(strip.text.y = element_text(margin = margin(10, 0, 10, 0)))

plotly1 <- ggplotly(plot1)
plotly1

For the year 2023, we can see that the industries with the Job Openings are “Education and Health”, “Leisure and Hospitality” and Business Services”. This could be correlated to the fact that COVID had drastically affected the Tourism Industry, as well as the business owners, regardless of whether it was a multinational corporation or a small business. Thus now that the effects of COVID have cleared, it makes sense that Job Openings in these fields are high, in comparison with the other sectors.

Another observation that we can make is that, there aren’t many opportunities in the Construction industry. This could probably attributed to the advent of high tech machinery, which has really made the construction business more effecient and streamlined. Though the side effect of that is a reduced number of overall Job Openings. Such similar observations can be made about the other industries as well.

3.3 Job Openings v/s Hires trend

Code
a <- jolts %>%
  filter(period != "M13", seasonal == "S", ratelevel_code == "R") %>%
  filter(display_level.industry_code == 2) %>%
  filter(dataelement_text == "Hires" | dataelement_text == "Job openings") %>%
  filter(year %in% c(2019, 2023)) %>%
  pivot_wider(id_cols = c("date","industry_text"), names_from = dataelement_text, values_from = value) %>%
  mutate(year = factor(year(date)))

plot2 <- ggplot(a, aes(Hires, `Job openings`, color = year)) +
  geom_point() +
  theme_classic() +
  facet_wrap(~ industry_text, ncol=2) +
  labs(title = "Job Openings vs Hires", x = "Hires (Rates)", y = "Job Openings (Rates)")

plotly2 <- ggplotly(plot2)
plotly2

In 2019, most jobs had fewer openings due to the pandemic, but the construction industry was hiring more people. Additionally, the information industry saw a slight increase in job openings during that time. Then, in 2023, many different types of jobs had more openings.

3.4 Layoffs and Discharges v/s Quits trend

Code
a <- jolts %>%
  filter(period != "M13", seasonal == "S", ratelevel_code == "R") %>%
  filter(display_level.industry_code == 2) %>%
  filter(dataelement_text == "Quits" | dataelement_text == "Layoffs and discharges") %>%
  filter(year %in% c(2019, 2023)) %>%
  pivot_wider(id_cols = c("date","industry_text"), names_from = dataelement_text, values_from = value) %>%
  mutate(year = factor(year(date)))

plot2 <- ggplot(a, aes(Quits, `Layoffs and discharges`, color = year)) +
  geom_point() +
  theme_classic() +
  facet_wrap(~ industry_text, ncol=2) +
  labs(title = "Layoffs and discharges vs Quits", x = "Quits (Rates)", y = "Layoffs and discharges (Rates)")

plotly2 <- ggplotly(plot2)
plotly2