Unemployment by sex and age – annual data - une_rt_a

Data - Eurostat

geo

Code
une_rt_a %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Geo))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

unit

Code
une_rt_a %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
PC_ACT Percentage of population in the labour force 11372
PC_POP Percentage of total population 11372
THS_PER Thousand persons 11372

sex

Code
une_rt_a %>%
  left_join(sex, by = "sex") %>%
  group_by(sex, Sex) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
sex Sex Nobs
T Total 11379
M Males 11376
F Females 11361

age

Code
une_rt_a %>%
  left_join(age, by = "age") %>%
  group_by(age, Age) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
age Age Nobs
Y15-24 De 15 à 24 ans 4887
Y15-74 De 15 à 74 ans 4887
Y20-64 De 20 à 64 ans 4887
Y25-54 De 25 à 54 ans 4887
Y25-74 De 25 à 74 ans 4887
Y55-74 De 55 à 74 ans 4866
Y15-29 De 15 à 29 ans 4815

France, Germany, Portugal

Code
une_rt_a %>%
  filter(geo %in% c("FR", "DE", "PT"),
         age == "Y20-64",
         sex == "T",
         unit == "PC_ACT") %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  xlab("") + ylab("Unemployment, Percentage of active population") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1))

Greece

English

Code
load_data("eurostat/age.RData")
une_rt_a %>%
  filter(geo %in% c("EL"),
         age %in% c("Y20-64", "Y15-24", "Y25-54"),
         sex == "T",
         unit == "PC_ACT") %>%
  year_to_date %>%
  left_join(age, by = "age") %>%
  filter(date >= as.Date("2007-01-01")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = values/100, color = Age, linetype = Age) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  theme(legend.position = c(0.15, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment in Greece (% of Active Population)") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 5),
                     labels = scales::percent_format(accuracy = 1))

Français

Code
load_data("eurostat/age_fr.RData")
une_rt_a %>%
  filter(geo %in% c("EL"),
         age %in% c("Y20-64", "Y15-24", "Y25-54"),
         sex == "T",
         unit == "PC_ACT") %>%
  year_to_date %>%
  left_join(age, by = "age") %>%
  filter(date >= as.Date("2007-01-01")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = values/100, color = Age, linetype = Age) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  theme(legend.position = c(0.15, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Chômage en Grèce (% de la population active)") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 5),
                     labels = scales::percent_format(accuracy = 1))

Euro Area

Code
load_data("eurostat/age.RData")
une_rt_a %>%
  filter(geo %in% c("EA19", "EU15", "DE"),
         age == "Y20-64",
         sex == "T",
         unit == "PC_ACT") %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = values/100, color = Geo, linetype = Geo) +
  scale_color_manual(values = viridis(4)[1:3]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
               labels = date_format("%y")) +
  theme(legend.position = c(0.3, 0.25),
        legend.title = element_blank()) +
  xlab("") + ylab("Percentage of active population") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1))

Phillips curves

Germany

Code
tipsna62 %>%
  filter(geo %in% c("DE"),
         unit == "THS_PER") %>%
  select(geo, time, emp = values) %>%
  left_join(tipslm13 %>%
              select(geo, time, comp = values),
            by = c("geo", "time")) %>%
  left_join(une_rt_a %>%
              filter(age == "Y20-64",
                     sex == "T",
                     unit == "PC_ACT") %>%
              select(geo, time, unr = values),
            by = c("geo", "time")) %>%
  mutate(comp_emp = comp/emp,
         comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
  year_to_enddate %>%
  transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
  gather(variable, value, -date) %>%
  mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
                              variable == "unr" ~ "Unemployment Rate (%)")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = value/100, color = Variable, linetype = Variable) +
  scale_color_manual(values = viridis(3)[1:2]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.8, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")

France

Code
tipsna62 %>%
  filter(geo %in% c("FR"),
         unit == "THS_PER") %>%
  select(geo, time, emp = values) %>%
  left_join(tipslm13 %>%
              select(geo, time, comp = values),
            by = c("geo", "time")) %>%
  left_join(une_rt_a %>%
              filter(age == "Y20-64",
                     sex == "T",
                     unit == "PC_ACT") %>%
              select(geo, time, unr = values),
            by = c("geo", "time")) %>%
  mutate(comp_emp = comp/emp,
         comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
  year_to_enddate %>%
  transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
  gather(variable, value, -date) %>%
  mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
                              variable == "unr" ~ "Unemployment Rate (%)")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = value/100, color = Variable, linetype = Variable) +
  scale_color_manual(values = viridis(3)[1:2]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")

Portugal

Code
tipsna62 %>%
  filter(geo %in% c("PT"),
         unit == "THS_PER") %>%
  select(geo, time, emp = values) %>%
  left_join(tipslm13 %>%
              select(geo, time, comp = values),
            by = c("geo", "time")) %>%
  left_join(une_rt_a %>%
              filter(age == "Y20-64",
                     sex == "T",
                     unit == "PC_ACT") %>%
              select(geo, time, unr = values),
            by = c("geo", "time")) %>%
  mutate(comp_emp = comp/emp,
         comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
  year_to_enddate %>%
  transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
  gather(variable, value, -date) %>%
  mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
                              variable == "unr" ~ "Unemployment Rate (%)")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = value/100, color = Variable, linetype = Variable) +
  scale_color_manual(values = viridis(3)[1:2]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")

Spain

Code
tipsna62 %>%
  filter(geo %in% c("ES"),
         unit == "THS_PER") %>%
  select(geo, time, emp = values) %>%
  left_join(tipslm13 %>%
              select(geo, time, comp = values),
            by = c("geo", "time")) %>%
  left_join(une_rt_a %>%
              filter(age == "Y20-64",
                     sex == "T",
                     unit == "PC_ACT") %>%
              select(geo, time, unr = values),
            by = c("geo", "time")) %>%
  mutate(comp_emp = comp/emp,
         comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
  year_to_enddate %>%
  transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
  gather(variable, value, -date) %>%
  mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
                              variable == "unr" ~ "Unemployment Rate (%)")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = value/100, color = Variable, linetype = Variable) +
  scale_color_manual(values = viridis(3)[1:2]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")

Italy

Code
tipsna62 %>%
  filter(geo %in% c("IT"),
         unit == "THS_PER") %>%
  select(geo, time, emp = values) %>%
  left_join(tipslm13 %>%
              select(geo, time, comp = values),
            by = c("geo", "time")) %>%
  left_join(une_rt_a %>%
              filter(age == "Y20-64",
                     sex == "T",
                     unit == "PC_ACT") %>%
              select(geo, time, unr = values),
            by = c("geo", "time")) %>%
  mutate(comp_emp = comp/emp,
         comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
  year_to_enddate %>%
  transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
  gather(variable, value, -date) %>%
  mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
                              variable == "unr" ~ "Unemployment Rate (%)")) %>%
  ggplot + geom_line() + theme_minimal()  +
  aes(x = date, y = value/100, color = Variable, linetype = Variable) +
  scale_color_manual(values = viridis(3)[1:2]) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
               labels = date_format("%y")) +
  scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.4, 0.9),
        legend.title = element_blank()) +
  xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")