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 4976
D2 Second decile 4976
D3 Third decile 4976
D4 Fourth decile 4976
D5 Fifth decile 4976
D6 Sixth decile 4976
D7 Seventh decile 4976
D8 Eighth decile 4976
D9 Ninth decile 4976
Q1 First quartile 4976
Q2 Second quartile 4976
Q3 Third quartile 4976
QU1 First quintile 4976
QU2 Second quintile 4976
QU3 Third quintile 4976
QU4 Fourth quintile 4976
P1 First percentile 4380
P5 Fifth percentile 4380
P95 Ninety-fifth percentile 4380
P96 Ninety-sixth percentile 4380
P97 Ninety-seventh percentile 4380
P98 Ninety-eighth percentile 4380
P99 Ninety-ninth percentile 4380
P3 Third percentile 4374
P4 Fourth percentile 4374
P2 Second percentile 4362
D10 Tenth decile 2488
Q4 Fourth quartile 2488
QU5 Fifth quintile 2488
P100 Hundredth percentile 2190

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 71347
TC Top cut-off point 61693

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))