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

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 105598
PAID Paid 81456
RECV Received 79470

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 42134
B6N Disposable income, net 42124
D4 Property income 34536
D7 Other current transfers 34536
D61 Net social contributions 25332
D62 Social benefits other than social transfers in kind 25072
D1 Compensation of employees 17628
B2A3N Operating surplus and mixed income, net 17548
D5 Current taxes on income, wealth, etc. 17268
B7N Adjusted disposable income, net 3792
P51C Consumption of fixed capital 2844
D63 Social transfers in kind 1970
P3 Final consumption expenditure 1740

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