LAST_COMPILE |
---|
2025-08-27 |
Pensions - spr_exp_pens
Data - Eurostat
Info
LAST_COMPILE
Last
Code
%>%
spr_exp_pens group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()
time | Nobs |
---|---|
2023 | 2189 |
spdepb
Code
%>%
spr_exp_pens left_join(spdepb, by = "spdepb") %>%
group_by(spdepb, Spdepb) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional
spdepb | Spdepb | Nobs |
---|---|---|
TOTAL | Total | 32316 |
OLD | NA | 32305 |
DIS | NA | 32239 |
SRV | NA | 32239 |
AOLD | NA | 32020 |
ERLM | NA | 31514 |
PART | NA | 31019 |
ERRC | NA | 31010 |
spdepm
Code
%>%
spr_exp_pens left_join(spdepm, by = "spdepm") %>%
group_by(spdepm, Spdepm) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional
spdepm | Spdepm | Nobs |
---|---|---|
TOTAL | Total | 85556 |
NMT | NA | 85512 |
MT | NA | 83594 |
unit
Code
%>%
spr_exp_pens left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional
unit | Unit | Nobs |
---|---|---|
MIO_EUR | Million euro | 27755 |
MIO_PPS | Million purchasing power standards (PPS) | 24416 |
PC_GDP | Percentage of gross domestic product (GDP) | 23552 |
MEUR_KP10 | Million euro (at constant 2010 prices) | 23168 |
MEUR_KP15 | NA | 23168 |
MIO_NAC | Million units of national currency | 22787 |
EUR_HAB_KP10 | Euro per inhabitant (at constant 2010 prices) | 22456 |
EUR_HAB_KP15 | NA | 22456 |
PPS_HAB | Purchasing power standard (PPS) per inhabitant | 22456 |
MNAC_KP10 | Million units of national currency at constant 2010 prices | 21224 |
MNAC_KP15 | NA | 21224 |
geo
Code
%>%
spr_exp_pens left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
select(Flag, everything()) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .} {
List of Countries: 2000-2019
Code
%>%
spr_exp_pens filter(# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP",
unit %in% c("1997", "2017")) %>%
time select(geo, time, values) %>%
left_join(geo, by = "geo") %>%
spread(time, values) %>%
mutate(`Change` = round(`2017` - `1997`, 1)) %>%
%>%
na.omit arrange(Change) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
select(Flag, everything()) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .} {
France, Germany, Italy
% of GDP - Total
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT"),
# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#009246")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Total Spending on Pensions (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
labels = scales::percent_format(accuracy = 1))
% of GDP - Old age pension
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT"),
# OLD: Old age pension
== "OLD",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # PC_GDP: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#009246")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = c(0.3, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Old Age Pension (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
labels = scales::percent_format(accuracy = 1))
Amounts (Bn€) - Total
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT"),
# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "MIO_EUR") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/1000) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#009246")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("") +
scale_y_log10(breaks = seq(0, 1000, 50),
labels = dollar_format(suffix = " Bn€", prefix = "", accuracy = 1))
Amounts (Bn€) - Old age pension
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT"),
# OLD: Old age pension
== "OLD",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "MIO_EUR") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/1000) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#009246")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("") +
scale_y_log10(breaks = seq(0, 1000, 50),
labels = dollar_format(suffix = " Bn€", prefix = "", accuracy = 1))
Austria, Denmark, Netherlands, Sweden
% of GDP - Total
Code
%>%
spr_exp_pens filter(geo %in% c("AT", "DK", "NL", "SE"),
# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = color)) +
ggplot scale_color_identity() + theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = c(0.1, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Total Spending on Pensions (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
labels = scales::percent_format(accuracy = 1))
France, Germany, Italy, Sweden
Total
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT", "SE"),
# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#009246", "#FECC00")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Total Spending on Pensions (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
labels = scales::percent_format(accuracy = 1))
France, Germany, Italy, Sweden, Greece
Total
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT", "SE", "EL"),
# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#0D5EAF", "#009246", "#FECC00")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Total Spending on Pensions (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
limits = c(0.09, 0.18),
labels = scales::percent_format(accuracy = 1))
France, Germany, Italy, Greece, Portugal
Total
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT", "EL", "PT"),
# OLD: Old age pension
== "TOTAL",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#0D5EAF", "#009246", "#FF0000")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Total Spending on Pensions (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
labels = scales::percent_format(accuracy = 1))
Old age pension
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT", "EL", "PT"),
# OLD: Old age pension
== "OLD",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#0D5EAF", "#009246", "#FF0000")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Old age pension (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 1),
labels = scales::percent_format(accuracy = 1))
Disability pension
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT", "EL", "PT"),
# OLD: Old age pension
== "DIS",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#0D5EAF", "#009246", "#FF0000")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Disability pension (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 0.2),
labels = scales::percent_format(accuracy = .1))
Survivors pension
Code
%>%
spr_exp_pens filter(geo %in% c("FR", "DE", "IT", "EL", "PT"),
# OLD: Old age pension
== "SRV",
spdepb # TOTAL: Total
== "TOTAL",
spdepm # MIO_EUR: Million euro
== "PC_GDP") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = Geo)) +
ggplot scale_color_manual(values = c("#002395", "#000000", "#0D5EAF", "#009246", "#FF0000")) +
theme_minimal() + add_flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
labels = date_format("%Y")) +
theme(legend.position = "none") +
xlab("") + ylab("Survivors pension (% of GDP)") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 0.2),
labels = scales::percent_format(accuracy = .1))