Population on 1 January by age, sex and NUTS 2 region - demo_r_d2jan

Data - Eurostat

unit

Code
demo_r_d2jan %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
NR Number 4407454

sex

Code
demo_r_d2jan %>%
  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 1469176
M Males 1469140
T Total 1469138

age

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

geo

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

Population

Code
demo_r_d2jan %>%
  filter(nchar(geo) == 4,
         time == "2018",
         sex == "T",
         age == "TOTAL") %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}