Income of households by NUTS 2 regions - nama_10r_2hhinc

Data - Eurostat

unit

Code
nama_10r_2hhinc %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
MIO_EUR Million euro 112038
MIO_NAC Million units of national currency 112038
EUR_HAB Euro per inhabitant 17407
PPS_EU27_2020_HAB Purchasing power standard (PPS, EU27 from 2020), per inhabitant 17407
MIO_PPS_EU27_2020 Million purchasing power standards (PPS, EU27 from 2020) 17064

direct

Code
nama_10r_2hhinc %>%
  left_join(direct, by = "direct") %>%
  group_by(direct, Direct) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
direct Direct Nobs
BAL Balance 105472
PAID Paid 88080
RECV Received 82402

na_item

Code
nama_10r_2hhinc %>%
  left_join(na_item, by = "na_item") %>%
  group_by(na_item, Na_item) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
na_item Na_item Nobs
B5N Balance of primary incomes/National income, net 41830
B6N Disposable income, net 41830
D4 Property income 33872
D7 Other current transfers 33872
D61 Net social contributions 28264
D62 Social benefits other than social transfers in kind 28126
D1 Compensation of employees 18428
D5 Current taxes on income, wealth, etc. 18256
B2A3N Operating surplus and mixed income, net 17028
P51C Consumption of fixed capital 6016
B7N Adjusted disposable income, net 4784
D63 Social transfers in kind 1838
P3 Final consumption expenditure 1810

geo

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

Table

Code
nama_10r_2hhinc %>%
  filter(time == "2015", 
         nchar(geo) == 4,
         direct == "BAL",
         na_item == "B6N") %>%
  select(geo, value_added = values) %>%
  full_join(nama_10r_3empers %>%
              filter(time == "2015",
                     nchar(geo) == 4,
                     wstatus == "EMP",
                     nace_r2 == "TOTAL") %>%
              select(geo, employment = values), by = "geo") %>%
  mutate(emp_person = round(1000*value_added / employment)) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, emp_person) %>%
  na.omit %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Maps

Code
nama_10r_2hhinc %>%
  filter(time == "2015", 
         nchar(geo) == 4,
         direct == "BAL",
         na_item == "B6N") %>%
  select(geo, value_added = values) %>%
  full_join(nama_10r_3empers %>%
              filter(time == "2015",
                     nchar(geo) == 4,
                     wstatus == "EMP",
                     nace_r2 == "TOTAL") %>%
              select(geo, employment = values), 
            by = "geo") %>%
  mutate(value = round(1000*value_added / employment)) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, value) %>%
  right_join(europe_NUTS2, by = "geo") %>%
  filter(long >= -15, lat >= 33, value <= 80000) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
                       breaks = c(seq(0, 80, 10), 100, 200),
                       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 = "Compensation / Person")