library(csodata)
library(tidyverse)
library(knitr)
library(kableExtra)
library(ggplot2)
library(lubridate)
library(ggrepel)

Headline

LRM01 <- cso_get_data("LRM01")
LRM01_long <- LRM01 %>%
  pivot_longer(!1:4, names_to = "yearm")
rm(LRM01)

LRM01_1 <- LRM01_long %>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "All ages")

LRM01_2 <- LRM01_long %>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "25 years and over")

LRM01_3 <- LRM01_long %>%
  filter(Sex == "Male" | Sex == "Female") %>%
  filter(Age.Group == "25 years and over")

LRM01_1$Month <- as.Date(paste(LRM01_1$yearm, "01", sep = "-"), "%YM%m-%d")
LRM01_1$Year <- year(LRM01_1$Month)
LRM01_3$Month <- as.Date(paste(LRM01_3$yearm, "01", sep = "-"), "%YM%m-%d")
LRM01_3$Year <- year(LRM01_3$Month)

LRM01_1_16 <- LRM01_1 %>%
  filter(Year >= "2016")
LRM01_1_21 <- LRM01_1 %>%
  filter(Year >= "2021")
LRM01_1_YTD <- LRM01_1 %>%
  filter(Year >= "2022")

The latest seasonally adjusted monthly unemployment rate for 15 - 74 years is 4.2% vs 4.3% in the previous period. For 25 - 74 years the figure is 3.1% vs 3.3% in the prior period.


MUM01: Seasonally Adjusted Unemployment

MUM01 <- cso_get_data("MUM01")
MUM01_long <- MUM01 %>%
  pivot_longer(!1:3, names_to = "yearm")
rm(MUM01)
MUM01_1 <- MUM01_long %>%
  filter(Statistic == "Seasonally Adjusted Monthly Unemployment Rate")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "15 - 74 years")

MUM01_2 <- MUM01_long %>%
  filter(Statistic == "Seasonally Adjusted Monthly Unemployment Rate")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "25 - 74 years")

MUM01_3 <- MUM01_long %>%
  filter(Statistic == "Seasonally Adjusted Monthly Unemployment Rate")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "15 - 74 years" | Age.Group == "25 - 74 years")

Unemployment Rate: All

tail_1 <- kable(tail(MUM01_1), caption = "Unemployment Rate: All - Latest Entries")
tail_1 %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
  row_spec(6, bold = T)%>%
  pack_rows("Latest Period", 6, 6, color = "navy")
Unemployment Rate: All - Latest Entries
Statistic Age.Group Sex yearm value
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M02 4.7
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M03 5.0
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M04 4.6
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M05 4.2
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M06 4.3
Latest Period
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M07 4.2

Unemployment Rate: 25 - 74 years

tail_2 <- kable(tail(MUM01_2), caption = "Unemployment Rate: All - 25 to 74 years")
tail_2 %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
  row_spec(6, bold = T)%>%
  pack_rows("Latest Period", 6, 6, color = "red")
Unemployment Rate: All - 25 to 74 years
Statistic Age.Group Sex yearm value
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M02 4.1
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M03 4.4
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M04 3.9
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M05 3.4
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M06 3.3
Latest Period
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M07 3.1

Time Series

MUM01_3$Month <- as.Date(paste(MUM01_3$yearm, "01", sep = "-"), "%YM%m-%d")
MUM01_3$Year <- year(MUM01_3$Month)

Line_Total <- ggplot(data=MUM01_3, aes(x=Month, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  geom_text_repel(aes(label=value),data = MUM01_3, size = 3)+
  labs(title = "Historical Series" ,
       subtitle = "January 1998 to date",
       y="Unemployment Rate",
       x="Month")+
  theme(legend.position = "bottom")

MUM01_3_16 <- MUM01_3 %>%
  filter(Year >= "2016")
MUM01_3_21 <- MUM01_3 %>%
  filter(Year >= "2021")


Line_2016<-ggplot(data=MUM01_3_16, aes(x=Month, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  labs(title = "Historical Series" ,
       subtitle = "January 2016 to date",
       y="Unemployment Rate",
       x="Month")+
  theme(legend.position = "bottom")

Line_2021<-ggplot(data=MUM01_3_21, aes(x=Month, y=value, group = Age.Group, colour=Age.Group))+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  scale_colour_manual(values=c("navy","red"))+
  labs(title = "Historical Series" ,
       subtitle = "January 2021 to date",
       y="Unemployment Rate",
       x="Month")+
  theme(legend.position = "bottom")

Line_Total

Line_2016

Line_2021