Incidence of unemployment by duration - DUR_I

Data - OECD

Code
load_data("oecd/DUR_I_var.RData")
DUR_I <- read_parquet("DUR_I.parquet")

Nobs - Javascript

Code
DUR_I |>
  left_join(DUR_I_var |> pluck("DURATION"), by = c("DURATION" = "id")) |>
  rename(`DURATION Description` = label) |>
  group_by(DURATION, `DURATION Description`, SEX, AGE) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Data Structure

Code
DUR_I_var |>
  pluck("VAR_DESC") %>%
  {if (is_html_output()) print_table(.) else .}
id description
COUNTRY Country
TIME Time
SEX Sex
AGE Age
DURATION Duration
FREQUENCY Frequency
OBS_VALUE Observation Value
TIME_FORMAT Time Format
OBS_STATUS Observation Status
UNIT Unit
POWERCODE Unit multiplier
REFERENCEPERIOD Reference period

DURATION

Code
DUR_I |>
  left_join(DUR_I_var |> pluck("DURATION"), by = c("DURATION" = "id")) |>
  rename(`DURATION Description` = label) |>
  group_by(DURATION, `DURATION Description`) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
DURATION DURATION Description Nobs
UN3 > 3 month and < 6 months 34114
UN5 1 year and over 34094
UN4 > 6 month and < 1 year 34076
UN2 > 1 month and < 3 months 33833
UN1 < 1 month 32186

SEX

Code
DUR_I |>
  left_join(DUR_I_var |> pluck("SEX"), by = c("SEX" = "id")) |>
  rename(`SEX Description` = label) |>
  group_by(SEX, `SEX Description`) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
SEX SEX Description Nobs
MW All persons 56946
MEN Men 56228
WOMEN Women 55129

AGE

Code
DUR_I |>
  left_join(DUR_I_var |> pluck("AGE"), by = c("AGE" = "id")) |>
  rename(`AGE Description` = label) |>
  group_by(AGE, `AGE Description`) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
AGE AGE Description Nobs
900000 Total 27046
2554 25 to 54 26235
1524 15 to 24 26154
5564 55 to 64 25207
2024 20 to 24 23104
1519 15 to 19 22925
6599 65+ 17632

All persons, All ages

France

Code
DUR_I |>
  filter(AGE == "900000", 
         SEX == "MW",
         COUNTRY == "FRA") |>
  year_to_enddate() |>
  ggplot() + theme_minimal() +
  geom_line(aes(x = date, y = obsValue/100, color = DURATION, linetype = DURATION)) + 
  scale_color_manual(values = viridis(6)[1:5]) +
  theme(legend.position = c(0.85, 0.9),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate (%)") +
  scale_x_date(breaks = seq(1920, 2100, 10) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.85, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 5),
                     labels = scales::percent_format(accuracy = 1))

Germany

Code
DUR_I |>
  filter(AGE == "900000", 
         SEX == "MW",
         COUNTRY == "DEU") |>
  year_to_enddate() |>
  ggplot() + theme_minimal() +
  geom_line(aes(x = date, y = obsValue/100, color = DURATION, linetype = DURATION)) + 
  scale_color_manual(values = viridis(6)[1:5]) +
  theme(legend.position = c(0.85, 0.9),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate (%)") +
  scale_x_date(breaks = seq(1920, 2100, 10) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.85, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 5),
                     labels = scales::percent_format(accuracy = 1))