Code
`7HA_A_Q` %>%
group_by(TRANSACT) %>%
summarise(Nobs = n()) %>%
left_join(`7HA_A_Q_var`$TRANSACT, by = "TRANSACT") %>%
arrange(-Nobs) %>%
print_table_conditional
Data - OECD
`7HA_A_Q` %>%
group_by(TRANSACT) %>%
summarise(Nobs = n()) %>%
left_join(`7HA_A_Q_var`$TRANSACT, by = "TRANSACT") %>%
arrange(-Nobs) %>%
print_table_conditional
`7HA_A_Q` %>%
left_join(`7HA_A_Q_var`$MEASURE, by = "MEASURE") %>%
group_by(MEASURE, Measure) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional
MEASURE | Measure | Nobs |
---|---|---|
C | National currency, current prices | 39082 |
CXCE | US $, current prices, current exchange rates, end of period | 38215 |
`7HA_A_Q` %>%
# AF6121: Pension plans managed by autonomous pension funds
# AF6122: Pension plans managed by non-autonomous pension funds
# AF6123: Insured pension plans
# AF6124: Other pension plans and unfunded pension plans
filter(TRANSACT %in% c("AF6121", "AF6122", "AF6123", "AF6124", "AF612"),
== "DEU",
LOCATION == "C") %>%
MEASURE year_to_enddate() %>%
left_join(`7HA_A_Q_var`$TRANSACT %>%
setNames(c("TRANSACT", "Transact")), by = "TRANSACT") %>%
ggplot() + xlab("") + ylab("Euros Managed") + theme_minimal() +
geom_line(aes(x = date, y = obsValue/1000, color = Transact, linetype = Transact)) +
scale_color_manual(values = viridis(4)[1:3]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
theme(legend.position = c(0.45, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(0, 4000, 50),
labels = dollar_format(suffix = " Bn€", prefix = "", accuracy = 1))
`7HA_A_Q` %>%
filter(TRANSACT %in% c("AF612"),
%in% c("DEU", "FRA"),
LOCATION == "C") %>%
MEASURE year_to_date() %>%
left_join(`7HA_A_Q_var`$LOCATION, by = "LOCATION") %>%
mutate(obsValue = obsValue / 1000) %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot() + theme_minimal() + xlab("") + ylab("") +
geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
theme(legend.position = c(0.45, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(0, 20000, 100),
labels = dollar_format(suffix = " Bn€", prefix = "", accuracy = 1))