Causes of death by NUTS 2 regions - crude death rate per 100 000 inhabitants - annual data - hlth_cd_acdr

Data - Eurostat

unit

Code
hlth_cd_acdr %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
RT Rate 5846589

sex

Code
hlth_cd_acdr %>%
  left_join(sex, by = "sex") %>%
  group_by(sex, Sex) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
sex Sex Nobs
T Total 1974385
F Females 1954976
M Males 1917228

age

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

icd10

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

geo

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

NUTS 2 - Suicide

2009

Code
hlth_cd_acdr %>%
  filter(time == "2009",
         age == "TOTAL",
         sex == "T",
         icd10 %in% c("X60-X84_Y870", "A-R_V-Y")) %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, icd10, values) %>%
  spread(icd10, values) %>%
  right_join(europe_NUTS2, by = "geo") %>%
  filter(long >= -13.5, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = `X60-X84_Y870`/`A-R_V-Y`)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = .1),
                       breaks = 0.01*seq(0, 100, 0.5),
                       values = c(0, 0.1, 0.3, 0.4, 0.5, 0.6, 1)) +
  theme_void() + theme(legend.position = c(0.15, 0.85)) +
  labs(fill = "Suicide Rate (%)")