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 115674
MIO_NAC Million units of national currency 115674
MIO_PPS_EU27_2020 Million purchasing power standards (PPS, EU27 from 2020) 18176
EUR_HAB Euro per inhabitant 17885
PPS_EU27_2020_HAB Purchasing power standard (PPS, EU27 from 2020), per inhabitant 17885

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 110856
PAID Paid 89588
RECV Received 84850

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 44072
B6N Disposable income, net 44072
D4 Property income 36100
D7 Other current transfers 36100
D61 Net social contributions 28370
D62 Social benefits other than social transfers in kind 28106
D1 Compensation of employees 18242
B2A3N Operating surplus and mixed income, net 18162
D5 Current taxes on income, wealth, etc. 18050
P51C Consumption of fixed capital 4986
B7N Adjusted disposable income, net 4550
P3 Final consumption expenditure 2346
D63 Social transfers in kind 2138

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")