Code
load_data("eurostat/hlth_sha11_hf.RData")
load_data("eurostat/icha11_hf.RData")
load_data("eurostat/geo.RData")
load_data("eurostat/unit.RData")Data - Eurostat
load_data("eurostat/hlth_sha11_hf.RData")
load_data("eurostat/icha11_hf.RData")
load_data("eurostat/geo.RData")
load_data("eurostat/unit.RData")hlth_sha11_hf %>%
left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}| unit | Unit | Nobs |
|---|---|---|
| MIO_EUR | Million euro | 7716 |
| PC_CHE | Percentual share of total current health expenditure (CHE) | 7716 |
| PC_GDP | Percentage of gross domestic product (GDP) | 7568 |
| EUR_HAB | Euro per inhabitant | 7310 |
| MIO_PPS | Million purchasing power standards (PPS) | 7276 |
| MIO_NAC | Million units of national currency | 7238 |
| PPS_HAB | Purchasing power standard (PPS) per inhabitant | 7050 |
| NAC_HAB | National currency per inhabitant | 7012 |
hlth_sha11_hf %>%
left_join(icha11_hf, by = "icha11_hf") %>%
group_by(icha11_hf, Icha11_hf) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}hlth_sha11_hf %>%
left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}hlth_sha11_hf %>%
filter(geo %in% c("FR", "DE", "IT"),
# HF1: Government schemes and compulsory contributory health care financing schemes
icha11_hf == "HF1",
# PC_GDP: Percentage of gross domestic product (GDP)
unit == "PC_GDP") %>%
left_join(geo, by = "geo") %>%
year_to_enddate %>%
ggplot + geom_line(aes(x = date, y = values/100, color = Geo)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme_minimal() +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
labels = date_format("%y")) +
theme(legend.position = c(0.3, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("") +
scale_y_continuous(breaks = 0.01*seq(0, 60, 0.5),
labels = scales::percent_format(accuracy = 0.1))