Unemployment rate by sex and age (%) - UNE_DEAP_SEX_AGE_RT_Q

Data - ILO

classif1

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  left_join(classif1, by = "classif1") %>%
  group_by(classif1, Classif1) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
classif1 Classif1 Nobs
AGE_YTHADULT_YGE15 Age (Youth, adults): 15+ 22628
AGE_YTHADULT_Y15-24 Age (Youth, adults): 15-24 18294
AGE_YTHADULT_YGE25 Age (Youth, adults): 25+ 18075
AGE_10YRBANDS_Y25-34 Age (10-year bands): 25-34 17462
AGE_10YRBANDS_Y35-44 Age (10-year bands): 35-44 17462
AGE_AGGREGATE_TOTAL Age (Aggregate bands): Total 17421
AGE_AGGREGATE_Y15-24 Age (Aggregate bands): 15-24 17421
AGE_AGGREGATE_Y25-54 Age (Aggregate bands): 25-54 17421
AGE_10YRBANDS_TOTAL Age (10-year bands): Total 17412
AGE_10YRBANDS_Y15-24 Age (10-year bands): 15-24 17412
AGE_10YRBANDS_Y45-54 Age (10-year bands): 45-54 17412
AGE_AGGREGATE_Y55-64 Age (Aggregate bands): 55-64 17412
AGE_YTHADULT_Y15-64 Age (Youth, adults): 15-64 17411
AGE_10YRBANDS_Y55-64 Age (10-year bands): 55-64 17403
AGE_5YRBANDS_TOTAL Age (5-year bands): Total 16953
AGE_5YRBANDS_Y20-24 Age (5-year bands): 20-24 16953
AGE_5YRBANDS_Y15-19 Age (5-year bands): 15-19 16936
AGE_10YRBANDS_YGE65 Age (10-year bands): 65+ 16869
AGE_AGGREGATE_YGE65 Age (Aggregate bands): 65+ 16669
AGE_5YRBANDS_Y25-29 Age (5-year bands): 25-29 16611
AGE_5YRBANDS_Y30-34 Age (5-year bands): 30-34 16611
AGE_5YRBANDS_Y35-39 Age (5-year bands): 35-39 16611
AGE_5YRBANDS_Y40-44 Age (5-year bands): 40-44 16611
AGE_5YRBANDS_Y45-49 Age (5-year bands): 45-49 16611
AGE_5YRBANDS_Y50-54 Age (5-year bands): 50-54 16602
AGE_5YRBANDS_Y55-59 Age (5-year bands): 55-59 16590
AGE_5YRBANDS_YGE65 Age (5-year bands): 65+ 16367
AGE_5YRBANDS_Y60-64 Age (5-year bands): 60-64 16342

source

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  left_join(source, by = "source") %>%
  group_by(source, Source) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()

sex

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  left_join(sex, by = "sex") %>%
  group_by(sex, Sex) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
sex Sex Nobs
SEX_T Sex: Total 161887
SEX_M Sex: Male 161073
SEX_F Sex: Female 161022

Nombre de chômeurs

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  filter(sex == "SEX_T",
         classif1 == "AGE_AGGREGATE_TOTAL") %>%
  left_join(ref_area, by = "ref_area") %>%
  mutate(obs_value = round(obs_value, 1)) %>%
  group_by(ref_area, Ref_area) %>%
  arrange(time) %>%
  summarise(Nobs = n(),
            `Year 1` = first(time),
            `Inflation 1` = first(obs_value),
            `Year 2` = last(time),
            `Inflation 2` = last(obs_value)) %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Ref_area)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Canada, Japan, United States

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  filter(ref_area %in% c("USA", "JPN", "CAN"),
         sex == "SEX_T",
         classif1 == "AGE_AGGREGATE_TOTAL") %>%
  left_join(ref_area, by = "ref_area") %>%
  quarter_to_date() %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obs_value/100, color = color)) + 
  geom_image(data = . %>%
               filter(date == as.Date("1993-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", Ref_area)), ".png")),
             aes(x = date, y = obs_value/100, image = image), asp = 1.5) +
  scale_color_identity() + theme_minimal() + 
  xlab("") + ylab("Unemployment rate") +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.85)) +
  scale_x_date(breaks = seq(1900, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

France, Germany, Spain

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  filter(ref_area %in% c("FRA", "DEU", "ESP"),
         sex == "SEX_T",
         classif1 == "AGE_AGGREGATE_TOTAL") %>%
  left_join(ref_area, by = "ref_area") %>%
  quarter_to_date() %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obs_value/100, color = color)) + 
  scale_color_identity() + theme_minimal() + 
  geom_image(data = . %>%
               filter(date == as.Date("2016-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", Ref_area)), ".png")),
             aes(x = date, y = obs_value/100, image = image), asp = 1.5) +
  xlab("") + ylab("Unemployment rate") +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.85)) +
  scale_x_date(breaks = seq(1900, 2020, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")

Hong Kong, Italy, Korea

Code
UNE_DEAP_SEX_AGE_RT_Q %>%
  filter(ref_area %in% c("HKG", "ITA", "KOR"),
         sex == "SEX_T",
         classif1 == "AGE_AGGREGATE_TOTAL") %>%
  left_join(ref_area, by = "ref_area") %>%
  quarter_to_date() %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obs_value/100, color = color)) + 
  scale_color_identity() + theme_minimal() + 
  xlab("") + ylab("Unemployment rate") +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.85)) +
  scale_x_date(breaks = seq(1900, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 10000, 2),
                     labels = percent_format(a = 1)) + 
  geom_hline(yintercept = 0, linetype = "dashed", color = "grey")