Code
tibble(LAST_DOWNLOAD = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/ilc_li02.RData")$mtime)) %>%
print_table_conditional()
LAST_DOWNLOAD |
---|
2024-10-08 |
Data - Eurostat
tibble(LAST_DOWNLOAD = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/ilc_li02.RData")$mtime)) %>%
print_table_conditional()
LAST_DOWNLOAD |
---|
2024-10-08 |
LAST_COMPILE |
---|
2024-11-05 |
%>%
ilc_li02 group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()
time | Nobs |
---|---|
2023 | 41664 |
%>%
ilc_li02 left_join(age, by = "age") %>%
group_by(age, Age) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
%>%
ilc_li02 left_join(sex, by = "sex") %>%
group_by(sex, Sex) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
sex | Sex | Nobs |
---|---|---|
T | Total | 338864 |
F | Females | 338717 |
M | Males | 338717 |
%>%
ilc_li02 left_join(indic_il, by = "indic_il") %>%
group_by(indic_il, Indic_il) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
indic_il | Indic_il | Nobs |
---|---|---|
LI_R_MD60 | At risk of poverty rate (cut-off point: 60% of median equivalised income after social transfers) | 146145 |
LI_R_MD50 | At risk of poverty rate (cut-off point: 50% of median equivalised income) | 145073 |
LI_R_M40 | At risk of poverty rate (cut-off point: 40% of mean equivalised income) | 145026 |
LI_R_M50 | At risk of poverty rate (cut-off point: 50% of mean equivalised income) | 145026 |
LI_R_M60 | At risk of poverty rate (cut-off point: 60% of mean equivalised income) | 145026 |
LI_R_MD40 | At risk of poverty rate (cut-off point: 40% of median equivalised income) | 145001 |
LI_R_MD70 | At risk of poverty rate (cut-off point: 70% of median equivalised income) | 145001 |
%>%
ilc_li02 left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
select(Flag, everything()) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .} {
%>%
ilc_li02 filter(sex == "T",
== "TOTAL",
age %in% c("FR", "DE", "SE"),
geo == "PC",
unit == "LI_R_M60") %>%
indic_il %>%
time_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(color = ifelse(geo == "NL", color2, color)) %>%
+ geom_line(aes(x = date, y = values, color = color)) +
ggplot theme_minimal() + add_3flags + scale_color_identity() +
scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.78, 0.2),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-7, 50, 1),
labels = percent_format(accuracy = 1)) +
ylab("Poverty Rate") + xlab("")
%>%
ilc_li02 filter(sex == "T",
== "TOTAL",
age %in% c("DE", "EA19"),
geo == "PC",
unit == "LI_R_M60") %>%
indic_il %>%
time_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
mutate(Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(color = ifelse(geo == "NL", color2, color)) %>%
+ geom_line(aes(x = date, y = values, color = color)) +
ggplot theme_minimal() + add_2flags + scale_color_identity() +
scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.78, 0.2),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-7, 50, 1),
labels = percent_format(accuracy = 1)) +
ylab("Poverty Rate") + xlab("")
%>%
ilc_li02 filter(sex == "T",
== "TOTAL",
age %in% c("FR", "DE", "IT", "ES", "NL"),
geo == "PC",
unit == "LI_R_M40") %>%
indic_il %>%
time_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(color = ifelse(geo == "NL", color2, color)) %>%
+ geom_line(aes(x = date, y = values, color = color)) +
ggplot theme_minimal() + add_5flags +
scale_color_identity() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.35, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-7, 50, 1),
labels = percent_format(accuracy = 1))
%>%
ilc_li02 filter(sex == "T",
== "TOTAL",
age %in% c("FR", "DE", "SE"),
geo == "PC",
unit == "LI_R_M40") %>%
indic_il %>%
time_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
left_join(colors, by = c("Geo" = "country")) %>%
+ geom_line(aes(x = date, y = values, color = color)) +
ggplot theme_minimal() + add_3flags +
scale_color_identity() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.35, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-7, 50, 1),
labels = percent_format(accuracy = 1))
%>%
ilc_li02 filter(sex == "T",
== "TOTAL",
age %in% c("FR", "DE"),
geo == "PC",
unit == "LI_R_M40") %>%
indic_il %>%
time_to_date left_join(geo, by = "geo") %>%
mutate(values = values/100) %>%
left_join(colors, by = c("Geo" = "country")) %>%
+ geom_line(aes(x = date, y = values, color = color)) +
ggplot theme_minimal() + add_2flags +
scale_color_identity() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.35, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-7, 50, 1),
labels = percent_format(accuracy = 1))