Structure of earnings survey - hourly earnings - earn_ses_hourly

Data - Eurostat

nace_r2

Code
earn_ses_hourly %>%
  left_join(nace_r2, by = "nace_r2") %>%
  group_by(nace_r2, Nace_r2) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
nace_r2 Nace_r2 Nobs
B-N Business economy 1045031
B-S_X_O Industry, construction and services (except public administration, defense, compulsory social security) 1028548
G-N Services of the business economy 998035
B-F Industry and construction 985993
P-S Education; human health and social work activities; arts, entertainment and recreation; other service activities 884741

isco08

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

worktime

Code
earn_ses_hourly %>%
  left_join(worktime, by = "worktime") %>%
  group_by(worktime, Worktime) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
worktime Worktime Nobs
TOTAL Total 1692667
FT Full-time 1672881
PT Part-time 1576800

age

Code
earn_ses_hourly %>%
  left_join(age, by = "age") %>%
  group_by(age, Age) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
age Age Nobs
TOTAL Total 925899
Y_LT30 Less than 30 years 877422
Y40-49 From 40 to 49 years 658402
Y30-39 From 30 to 39 years 658369
Y50-59 From 50 to 59 years 655406
Y_GE60 60 years or over 633974
Y30-49 From 30 to 49 years 250402
Y_GE50 50 years or over 249784
Y20-29 From 20 to 29 years 13320
Y_LT20 Less than 20 years 13170
UNK Unknown 6200

sex

Code
earn_ses_hourly %>%
  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 1706549
M Males 1633579
F Females 1602220

indic_se

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

geo

Code
earn_ses_hourly %>%
  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
earn_ses_hourly %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) print_table(.) else .}
time Nobs
2002 720588
2006 973394
2010 1037329
2014 1197653
2018 1013384

Table

png

Code
include_graphics3b("bib/eurostat/earn_ses_hourly_ex1.png")

Javascript

Code
earn_ses_hourly %>%
  filter(nace_r2 == "B-N",
         isco08 == "TOTAL",
         worktime == "TOTAL", 
         age == "TOTAL",
         sex == "T",
         indic_se == "MEAN_E_EUR",
         time %in% c("2002", "2010", "2018")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, time, values) %>%
  na.omit %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo),
         values = round(values)) %>%
  spread(time, values) %>%
  mutate_at(vars(-1, -2), funs(ifelse(is.na(.), "", paste0(., " €")))) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Maps

2018

Code
earn_ses_hourly %>%
  filter(nace_r2 == "B-N",
         isco08 == "TOTAL",
         worktime == "TOTAL", 
         age == "TOTAL",
         sex == "T",
         indic_se == "MEAN_E_EUR",
         time %in% c("2018")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS0, by = "geo") %>%
  filter(long >= -15, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = "€"),
                       breaks = seq(0, 100, 5),
                       values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
  theme_void() + theme(legend.position = c(0.25, 0.85)) + 
  labs(fill = "Avg Wage")

2014

Code
earn_ses_hourly %>%
  filter(nace_r2 == "B-N",
         isco08 == "TOTAL",
         worktime == "TOTAL", 
         age == "TOTAL",
         sex == "T",
         indic_se == "MEAN_E_EUR",
         time %in% c("2014")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS0, by = "geo") %>%
  filter(long >= -15, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = "€"),
                       breaks = seq(0, 100, 5),
                       values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
  theme_void() + theme(legend.position = c(0.25, 0.85)) + 
  labs(fill = "Avg Wage")