Population and employment - nama_10_pe

Data - Eurostat

Info

source dataset .html .RData
eurostat nama_10_pe 2024-11-01 2024-10-08
eurostat namq_10_pe 2024-11-01 2024-10-09

LAST_COMPILE

LAST_COMPILE
2024-11-05

Last

Code
nama_10_pe %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2023 478

na_item

Code
nama_10_pe %>%
  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
POP_NC Total population national concept 2567
EMP_DC Total employment domestic concept 2454
SAL_DC Employees domestic concept 2391
SELF_DC Self-employed domestic concept 2391
EMP_NC Total employment national concept 2049
SAL_NC Employees national concept 2002
SELF_NC Self-employed national concept 2002

unit

Code
nama_10_pe %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
THS_PER Thousand persons 8056
PCH_PRE_PER Percentage change on previous period (based on persons) 7800

geo

Code
nama_10_pe %>%
  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
nama_10_pe %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Population Table

English

Code
nama_10_pe %>%
  filter(time %in% c("2019", "2009", "1999", "1989"),
         na_item == "POP_NC",
         unit == "THS_PER") %>%
  select(geo, time, values) %>%
  mutate(values = round(values/1000, 1)) %>%
  left_join(geo, by = "geo") %>%
  spread(time, values) %>%
  arrange(- `2019`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

French

Code
load_data("eurostat/geo_fr.RData")
nama_10_pe %>%
  filter(time %in% c("2019", "2009", "1999", "1989"),
         na_item == "POP_NC",
         unit == "THS_PER") %>%
  select(geo, time, values) %>%
  mutate(values = round(values/1000, 1)) %>%
  left_join(geo, by = "geo") %>%
  spread(time, values) %>%
  arrange(- `2019`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

png table

Code
include_graphics3("bib/eurostat/nama_10_pe_ex1.png")

Employment Table

Code
load_data("eurostat/geo.RData")
nama_10_pe %>%
  filter(time %in% c("2019", "2009", "1999", "1989"),
         na_item == "EMP_DC",
         unit == "THS_PER") %>%
  select(geo, time, values) %>%
  mutate(values = round(values/1000, 1)) %>%
  left_join(geo, by = "geo") %>%
  spread(time, values) %>%
  arrange(- `2019`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Employment / Population Table

Code
load_data("eurostat/geo_fr.RData")
nama_10_pe %>%
  filter(time %in% c("2019", "2009", "1999", "1989"),
         na_item %in% c("EMP_DC", "POP_NC"),
         unit == "THS_PER") %>%
  select(geo, na_item, time, values) %>%
  spread(na_item, values) %>%
  transmute(geo, time, values = 100*EMP_DC/POP_NC) %>%
  mutate(values = round(values, 1)) %>%
  left_join(geo, by = "geo") %>%
  spread(time, values) %>%
  arrange(- `2019`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Poland, Germany, Hungary

Code
nama_10_pe %>%
  filter(geo %in% c("PL", "DE", "HU"),
         na_item %in% c("EMP_DC", "POP_NC"),
         unit == "THS_PER") %>%
  select(geo, na_item, time, values) %>%
  spread(na_item, values) %>%
  transmute(geo, time, values = EMP_DC/POP_NC) %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  ggplot + geom_line(aes(x = date, y = values, color = Geo, linetype = Geo)) +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 5), "-01-01")),
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = 0.01*seq(-30, 70, 1),
                labels = percent_format(a = 1))

France, Italy, Spain

Code
nama_10_pe %>%
  filter(geo %in% c("FR", "IT", "ES"),
         na_item %in% c("EMP_DC", "POP_NC"),
         unit == "THS_PER") %>%
  select(geo, na_item, time, values) %>%
  spread(na_item, values) %>%
  transmute(geo, time, values = EMP_DC/POP_NC) %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  ggplot + geom_line(aes(x = date, y = values, color = Geo, linetype = Geo)) +
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 5), "-01-01")),
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = 0.01*seq(-30, 70, 1),
                labels = percent_format(a = 1))