Employment by sex, age, job tenure and NUTS 2 regions - lfst_r_egad

Data - Eurostat

unit

Code
lfst_r_egad %>%
  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 Percentage 1288140
THS_PER Thousand persons 1288140

duration

Code
lfst_r_egad %>%
  left_join(duration, by = "duration") %>%
  group_by(duration, Duration) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
duration Duration Nobs
TOTAL Total 471282
M_GE60 60 months or over 467062
M24-59 From 24 to 59 months 459604
M0-11 From 0 to 11 months 455686
M12-23 From 12 to 23 months 451658
NRP No response 270988

sex

Code
lfst_r_egad %>%
  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 867836
M Males 859750
F Females 848694

age

Code
lfst_r_egad %>%
  left_join(age, by = "age") %>%
  group_by(age, Age) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
age Age Nobs
Y_GE15 15 years or over 377514
Y15-74 From 15 to 74 years 377484
Y15-64 From 15 to 64 years 377362
Y20-64 From 20 to 64 years 377172
Y25-64 From 25 to 64 years 376696
Y15-24 From 15 to 24 years 367998
Y65-74 From 65 to 74 years 322054

geo

Code
lfst_r_egad %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

time

Code
lfst_r_egad %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Long-Term (60m+), Age 15+

Code
lfst_r_egad %>%
  filter(unit == "PC",
         duration == "M_GE60",
         sex == "T",
         age == "Y_GE15",
         nchar(geo) == 4,
         time == "2018") %>%
  right_join(europe_NUTS2, by = "geo") %>%
  filter(long >= -13.5, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values/100)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(20, 100, 5),
                       values = c(0, 0.1, 0.3, 0.5, 0.7, 0.8, 1)) +
  theme_void() + theme(legend.position = c(0.15, 0.85)) +
  labs(fill = "Employment (%) \nLong-Term (60m+), Age 15+")

Medium-Term (M24-59), Age 15+

Code
lfst_r_egad %>%
  filter(unit == "PC",
         duration == "M24-59",
         sex == "T",
         age == "Y_GE15",
         nchar(geo) == 4,
         time == "2018") %>%
  right_join(europe_NUTS2, by = "geo") %>%
  filter(long >= -13.5, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values/100)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(0, 100, 5),
                       values = c(0, 0.1, 0.3, 0.5, 0.7, 0.8, 1)) +
  theme_void() + theme(legend.position = c(0.15, 0.85)) +
  labs(fill = "Employment (%) \nMedium-Term (24-59), Age 15+")

Short-Term (M12-23), Age 15+

Code
lfst_r_egad %>%
  filter(unit == "PC",
         duration == "M12-23",
         sex == "T",
         age == "Y_GE15",
         nchar(geo) == 4,
         time == "2018") %>%
  right_join(europe_NUTS2, by = "geo") %>%
  filter(long >= -13.5, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values/100)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(0, 100, 2),
                       values = c(0, 0.1, 0.3, 0.5, 0.7, 0.8, 1)) +
  theme_void() + theme(legend.position = c(0.15, 0.85)) +
  labs(fill = "Employment (%) \nLong-Term (60m+), Age 15+")

Short-Term (M0-11), Age 15+

Code
lfst_r_egad %>%
  filter(unit == "PC",
         duration == "M0-11",
         sex == "T",
         age == "Y_GE15",
         nchar(geo) == 4,
         time == "2018") %>%
  right_join(europe_NUTS2, by = "geo") %>%
  filter(long >= -13.5, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values/100)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(0, 100, 5),
                       values = c(0, 0.1, 0.3, 0.5, 0.7, 0.8, 1)) +
  theme_void() + theme(legend.position = c(0.15, 0.85)) +
  labs(fill = "Employment (%) \nShort-Term (M0-11), Age 15+")