Code
%>%
nasa_10_pens1 left_join(na_item, by = "na_item") %>%
group_by(na_item, Na_item) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
Data - Eurostat
%>%
nasa_10_pens1 left_join(na_item, by = "na_item") %>%
group_by(na_item, Na_item) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nasa_10_pens1 left_join(penscheme, by = "penscheme") %>%
group_by(penscheme, Penscheme) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
penscheme | Penscheme | Nobs |
---|---|---|
S1P | Pension schemes (core and not core accounts) | 4420 |
S13PS | Social security pension schemes (not in core accounts) | 4014 |
S12P | Private pension schemes | 3742 |
S12PB | Private defined benefit schemes | 3432 |
S12PC | Private defined contribution schemes | 3418 |
S13PBX | Defined benefit schemes for general government employees classified in general government (not in core accounts) | 3406 |
S12PBI | Defined benefit schemes for general government employees classified in financial corporations | 3164 |
S13PBI | Defined benefit schemes for general government employees classified in general government (core accounts) | 2768 |
S13PC | Defined contribution schemes of general government (core accounts) | 2750 |
S14R | Counterparts: resident households | 2480 |
S14NR | Counterparts: non-resident households | 1756 |
S1PF | Private/Funded entitlements | 132 |
S13PU | Unfunded entitlements | 130 |
%>%
nasa_10_pens1 left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nasa_10_pens1 left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nasa_10_pens1 filter(geo %in% c("FR", "DE", "IT"),
# D62_P: Social insurance pension benefits
== "D62_P",
na_item # S1P: Pension schemes (core and not core accounts)
== "S1P",
penscheme == "MIO_EUR") %>%
unit %>%
year_to_date + geom_line(aes(x = date, y = values/1000, color = geo)) +
ggplot 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.2, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("") +
scale_y_log10(breaks = seq(0, 1000, 100),
labels = dollar_format(suffix = " Bn€", prefix = "", accuracy = 1))