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

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 70897
TC Top cut-off point 61303

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