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

Summary

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.8% vs 4.7% in the previous period. For 25 - 74 years the figure is 4.7% vs 4.6% 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)

Descriptive Variables & Subset

Assess the unique descriptive variables to create a subset for analysis

##                            MUM01_long.Statistic
## 1      Seasonally Adjusted Monthly Unemployment
## 2 Seasonally Adjusted Monthly Unemployment Rate
##   MUM01_long.Age.Group
## 1        15 - 24 years
## 2        15 - 74 years
## 3        25 - 74 years
##   MUM01_long.Sex
## 1     Both sexes
## 2           Male
## 3         Female

Create subsets:

  1. Seasonally Adjusted Monthly Unemployment Rate for Both Sexes & 15 - 74 years
  2. Seasonally Adjusted Monthly Unemployment Rate for Both Sexes & 25 - 74 years
  3. Seasonally Adjusted Monthly Unemployment Rate for Both Sexes with both age categories specified above
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 2022M01 5.0
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M02 4.8
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M03 5.1
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M04 4.8
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M05 4.7
Latest Period
Seasonally Adjusted Monthly Unemployment Rate 15 - 74 years Both sexes 2022M06 4.8

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 2022M01 4.2
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M02 4.2
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M03 4.8
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M04 4.7
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M05 4.6
Latest Period
Seasonally Adjusted Monthly Unemployment Rate 25 - 74 years Both sexes 2022M06 4.7

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

LRM01: Persons on Live Register

Create subsets, to include “All classes”.

  1. Both sexes and All ages
  2. Both sexes and 25 years and over
  3. Male & Female and All ages
LRM01_1 <- LRM01_long %>%
  filter(Social.Welfare.Scheme=="All classes")%>%
  filter(Sex == "Both sexes") %>%
  filter(Age.Group == "All ages")

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

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

Live Register - All

tail_LR <- kable(tail(LRM01_1), caption = "Live Register: All - Latest Entries")
tail_LR %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>%
  row_spec(6, bold = T)%>%
  pack_rows("Latest Period", 6, 6, color = "blue")
Live Register: All - Latest Entries
STATISTIC Age.Group Sex Social.Welfare.Scheme yearm value
Persons on Live Register All ages Both sexes All classes 2022M01 162578
Persons on Live Register All ages Both sexes All classes 2022M02 163248
Persons on Live Register All ages Both sexes All classes 2022M03 178996
Persons on Live Register All ages Both sexes All classes 2022M04 177004
Persons on Live Register All ages Both sexes All classes 2022M05 171903
Latest Period
Persons on Live Register All ages Both sexes All classes 2022M06 186819

Time Series

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")

Line_Total_LR <- ggplot(data=LRM01_1, aes(x=Month, y=value), colour="purple")+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  labs(title = "Historical Series" ,
       subtitle = "January 1967 to date",
       y="Live Register Nr.",
       x="Month")+
  scale_y_continuous(labels = scales::comma)+
  theme(legend.position = "bottom")

Line_Total_LR_16 <- ggplot(data=LRM01_1_16, aes(x=Month, y=value), colour="purple")+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  labs(title = "Historical Series" ,
       subtitle = "January 2016 to date",
       y="Live Register Nr.",
       x="Month")+
  scale_y_continuous(labels = scales::comma)+
  theme(legend.position = "bottom")

Line_Total_LR_21 <- ggplot(data=LRM01_1_21, aes(x=Month, y=value), colour="purple")+
  geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5)+
  labs(title = "Historical Series" ,
       subtitle = "January 2021 to date",
       y="Live Register Nr.",
       x="Month")+
  scale_y_continuous(labels = scales::comma)+
  theme(legend.position = "bottom")


Line_Total_LR

Line_Total_LR_16

Line_Total_LR_21