Distribution of income by quantiles - EU-SILC and ECHP surveys - ilc_di01

Data - Eurostat

quantile

Code
ilc_di01 %>%
  left_join(quantile, by = "quantile") %>%
  group_by(quantile, Quantile) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
quantile Quantile Nobs
D1 First decile 5012
D2 Second decile 5012
D3 Third decile 5012
D4 Fourth decile 5012
D5 Fifth decile 5012
D6 Sixth decile 5012
D7 Seventh decile 5012
D8 Eighth decile 5012
D9 Ninth decile 5012
Q1 First quartile 5012
Q2 Second quartile 5012
Q3 Third quartile 5012
QU1 First quintile 5012
QU2 Second quintile 5012
QU3 Third quintile 5012
QU4 Fourth quintile 5012
P1 First percentile 4416
P5 Fifth percentile 4416
P95 Ninety-fifth percentile 4416
P96 Ninety-sixth percentile 4416
P97 Ninety-seventh percentile 4416
P98 Ninety-eighth percentile 4416
P99 Ninety-ninth percentile 4416
P3 Third percentile 4410
P4 Fourth percentile 4410
P2 Second percentile 4398
D10 Tenth decile 2506
Q4 Fourth quartile 2506
QU5 Fifth quintile 2506
P100 Hundredth percentile 2208

indic_il

Code
ilc_di01 %>%
  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
SHARE Share of national equivalised income 71887
TC Top cut-off point 62161

geo

Code
ilc_di01 %>%
  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 .}

D10 / D1

Code
ilc_di01 %>%
  filter(quantile %in% c("D1", "D10"),
         geo %in% c("FR", "DE"),
         currency == "EUR",
         indic_il == "SHARE") %>%
  time_to_date %>%
  left_join(geo, by = "geo") %>%
  arrange(date, quantile, geo, values) %>%
  spread(quantile, values) %>%
  mutate(values = D10/D1) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_2flags + theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 5), "-01-01")),
               labels = date_format("%y")) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(0, 20, 1))

D9 / D1

Code
ilc_di01 %>%
  filter(quantile %in% c("D1", "D9"),
         geo %in% c("FR", "DE"),
         currency == "EUR",
         indic_il == "SHARE") %>%
  time_to_date %>%
  left_join(geo, by = "geo") %>%
  arrange(date, quantile, geo, values) %>%
  spread(quantile, values) %>%
  mutate(values = D9/D1) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_2flags + theme_minimal()  +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 5), "-01-01")),
               labels = date_format("%y")) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(0, 20, 1))