Infant mortality rates

Data - Eurostat

Info

source dataset .html .RData
eurostat demo_minfind 2024-11-01 2024-10-08
oecd FAMILY 2024-09-15 2024-02-13

Last

Code
demo_minfind %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(3) %>%
  print_table_conditional()
time Nobs
2022 144
2021 137
2020 161

unit

Code
demo_minfind %>%
  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 10887

indic_de

Code
demo_minfind %>%
  left_join(indic_de, by = "indic_de") %>%
  group_by(indic_de, Indic_de) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
indic_de Indic_de Nobs
INFMORRT Infant mortality rate 2968
ENEOMORRT Early neonatal mortality rate 2052
NEOMORRT Neonatal mortality rate 2030
LFOEMORRT Late foetal mortality rate 1976
PERIMORRT Perinatal mortality rate 1861

geo

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

Table

2022

Code
demo_minfind %>%
  filter(indic_de == "INFMORRT",
         time %in% c("2022")) %>%
  left_join(geo, by = "geo") %>%
  #filter(geo %in% geo_eurozone) %>%
  arrange(-values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Evolution 2011-2021

Code
load_data("eurostat/geo_fr.RData")
table1 <- demo_minfind %>%
  filter(indic_de == "INFMORRT",
         time %in% c("2011","2021")) %>%
  left_join(geo, by = "geo") %>%
  filter(geo %in% geo_eurozone) %>%
  spread(time, values) %>%
  select_if(~ n_distinct(.) > 1) %>%
  mutate(`Evolution 2011-2021` = round(`2021`-`2011`, 1)) %>%
  arrange(-`Evolution 2011-2021`)
load_data("eurostat/geo.RData")

Evolution 2012-2022

Code
load_data("eurostat/geo_fr.RData")
table1 <- demo_minfind %>%
  filter(indic_de == "INFMORRT",
         time %in% c("2012","2022")) %>%
  left_join(geo, by = "geo") %>%
  filter(geo %in% geo_eurozone) %>%
  spread(time, values) %>%
  select_if(~ n_distinct(.) > 1) %>%
  mutate(`Evolution 2012-2022` = round(`2022`-`2012`, 1)) %>%
  arrange(-`Evolution 2012-2022`)
load_data("eurostat/geo.RData")

table1
# # A tibble: 19 × 5
#    geo   Geo        `2012` `2022` `Evolution 2012-2022`
#    <chr> <chr>       <dbl>  <dbl>                 <dbl>
#  1 LU    Luxembourg    2.5    3.5                   1  
#  2 SI    Slovénie      1.6    2.5                   0.9
#  3 FR    France        3.5    4                     0.5
#  4 EL    Grèce         2.9    3                     0.1
#  5 MT    Malte         5.3    5.3                   0  
#  6 DE    Allemagne     3.3    3.2                  -0.1
#  7 IE    Irlande       3.5    3.2                  -0.3
#  8 CY    Chypre        3.5    3.1                  -0.4
#  9 FI    Finlande      2.4    2                    -0.4
# 10 SK    Slovaquie     5.8    5.4                  -0.4
# 11 ES    Espagne       3.1    2.6                  -0.5
# 12 NL    Pays-Bas      3.7    3.2                  -0.5
# 13 IT    Italie        2.9    2.3                  -0.6
# 14 AT    Autriche      3.2    2.4                  -0.8
# 15 PT    Portugal      3.4    2.6                  -0.8
# 16 BE    Belgique      3.8    2.9                  -0.9
# 17 LT    Lituanie      3.9    3                    -0.9
# 18 EE    Estonie       3.6    2.2                  -1.4
# 19 LV    Lettonie      6.3    2.4                  -3.9

France

1996-

Not Log

Code
demo_minfind %>%
  filter(geo %in% c("FR"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  filter(date >= as.Date("1996-01-01")) %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") +
  scale_x_date(breaks = seq(1994, 2050, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(1, 10, 0.2),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

France, Germany, Italy

All

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_3flags +
  scale_x_date(breaks = seq(1940, 2050, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(0, 100, 10), 6, 8, 15, 25, seq(1, 5, 1)),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

1996-

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT"),
         indic_de == "INFMORRT") %>%
  year_to_date %>%
  filter(date >= as.Date("1996-01-01")) %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_3flags +
  scale_x_date(breaks = seq(1940, 2050, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(1, 10, 0.2),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

France, Germany, Italy, Spain, Greece

All

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES", "EL"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_5flags +
  scale_x_date(breaks = seq(1940, 2050, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(0, 100, 10), 6, 8, 15, 25, seq(1, 5, 1)),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

1977-

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES", "EL"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("1977-01-01")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_5flags +
  scale_x_date(breaks = seq(1978, 2023, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 20),
                     labels = dollar_format(a = .1, pre = "", su = "‰")) +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

1985-

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES", "EL"),
         indic_de == "INFMORRT") %>%
  add_row(geo = "FR", time = "2022", values = 3.9 ) %>%
  add_row(geo = "FR", time = "2023", values = 4 ) %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("1985-01-01")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_5flags +
  scale_x_date(breaks = seq(1941, 2050, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(2, 3, 5, 6, 8, 12, 15, 25),
                     labels = dollar_format(a = .1, pre = "", su = "‰")) +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

France, Germany, Italy, Spain

Table 2020, 2021

See here

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES"),
         indic_de == "INFMORRT",
         time %in% c("2020", "2021")) %>%
  print_table_conditional()
freq unit indic_de geo time values
A RT INFMORRT DE 2020 3.1
A RT INFMORRT DE 2021 3.0
A RT INFMORRT ES 2020 2.6
A RT INFMORRT ES 2021 2.5
A RT INFMORRT FR 2020 3.6
A RT INFMORRT FR 2021 3.7
A RT INFMORRT IT 2020 2.4
A RT INFMORRT IT 2021 2.3

All

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_4flags +
  scale_x_date(breaks = seq(1940, 2050, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(0, 100, 10), 6, 8, 15, 25, seq(1, 5, 1)),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

1996-

Not Log

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  filter(date >= as.Date("1996-01-01")) %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_4flags +
  scale_x_date(breaks = seq(1941, 2050, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(1, 10, 0.2),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

Log

Code
demo_minfind %>%
  filter(geo %in% c("FR", "DE", "IT", "ES"),
         indic_de == "INFMORRT") %>%
  bind_rows(FAMILY_FAM16A_FRA) %>%
  year_to_date %>%
  filter(date >= as.Date("1996-01-01")) %>%
  left_join(geo, by  = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = values, color = color)) + 
  xlab("") + ylab("Taux de mortalité infantile (‰)") + add_4flags +
  scale_x_date(breaks = seq(1940, 2050, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(1, 10, 0.2),
                     labels = dollar_format(a = .1, pre = "", su = "‰"))

NUTS 0

Infant Mortality Rates

Code
demo_minfind %>%
  filter(time == "2018", 
         indic_de == "INFMORRT") %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS0, by = "geo") %>%
  filter(long >= -15, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values/100)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(0, 10, 1),
                       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 = "Infant Mortality Rates")

Neonatal Mortality Rates

Code
demo_minfind %>%
  filter(time == "2018", 
         indic_de == "NEOMORRT") %>%
  left_join(geo, by = "geo") %>%
  select(geo, Geo, values) %>%
  right_join(europe_NUTS0, by = "geo") %>%
  filter(long >= -15, lat >= 33) %>%
  ggplot(., aes(x = long, y = lat, group = group, fill = values/100)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(0, 10, 1),
                       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 = "Neonatal Mortality Rates")