Mean hourly earnings by NUTS 1 regions (enterprises with 10 employees or more) - NACE Rev. 2, B-S excluding O - earn_ses14_rhr

Data - Eurostat

sex

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

unit

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

geo

Code
earn_ses14_rhr %>%
  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_ses14_rhr %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) print_table(.) else .}
time Nobs
2014 930

Table

Javascript

Code
earn_ses14_rhr %>%
  filter(sex == "T") %>%
  left_join(geo, by = "geo") %>%
  left_join(unit, by = "unit") %>%
  select(geo, Geo, Unit, values) %>%
  na.omit %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo),
         values = round(values, 1)) %>%
  spread(Unit, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Maps

Total

Code
earn_ses14_rhr %>%
  filter(sex == "T",
         unit == "EUR") %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS1, 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")

Men

Code
earn_ses14_rhr %>%
  filter(sex == "M",
         unit == "EUR") %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS1, 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")

Women

Code
earn_ses14_rhr %>%
  filter(sex == "F",
         unit == "EUR") %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS1, 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")