GDP per capita, PPP (current international D)

Data - WDI

Info

source dataset .html .RData
wdi NY.GDP.PCAP.PP.CD 2024-11-17 2024-11-18

Data on macro

source dataset .html .RData
eurostat nama_10_a10 2024-11-08 2024-10-08
eurostat nama_10_a10_e 2024-11-08 2024-11-09
eurostat nama_10_gdp 2024-11-08 2024-10-08
eurostat nama_10_lp_ulc 2024-11-08 2024-10-08
eurostat namq_10_a10 2024-11-16 2024-11-16
eurostat namq_10_a10_e 2024-11-16 2024-11-16
eurostat namq_10_gdp 2024-11-05 2024-10-08
eurostat namq_10_lp_ulc 2024-11-05 2024-11-04
eurostat namq_10_pc 2024-11-05 2024-11-08
eurostat nasa_10_nf_tr 2024-11-05 2024-10-08
eurostat nasq_10_nf_tr 2024-11-05 2024-10-09
fred gdp 2024-11-09 2024-11-09
oecd QNA 2024-06-06 2024-11-18
oecd SNA_TABLE1 2024-11-16 2024-11-16
oecd SNA_TABLE14A 2024-09-15 2024-06-30
oecd SNA_TABLE2 2024-07-01 2024-04-11
oecd SNA_TABLE6A 2024-07-01 2024-06-30
wdi NE.RSB.GNFS.ZS 2024-09-18 2024-09-18
wdi NY.GDP.MKTP.CD 2024-09-18 2024-09-26
wdi NY.GDP.MKTP.PP.CD 2024-09-18 2024-09-18
wdi NY.GDP.PCAP.CD 2024-11-17 2024-11-18
wdi NY.GDP.PCAP.KD 2024-09-18 2024-09-18
wdi NY.GDP.PCAP.PP.CD 2024-11-17 2024-11-18
wdi NY.GDP.PCAP.PP.KD 2024-11-17 2024-11-17

LAST_COMPILE

LAST_COMPILE
2024-11-18

Last

year Nobs
2023 232

Nobs - Javascript

Code
NY.GDP.PCAP.PP.CD %>%
  left_join(iso2c, by = "iso2c") %>%
  group_by(iso2c, Iso2c) %>%
  
  mutate(value = round(value)) %>%
  summarise(Nobs = n(),
            `Year 1` = first(year),
            `GDP per capita, PPP 1` = first(value) %>% paste0("$ ", .),
            `Year 2` = last(year),
            `GDP per capita, PPP 2` = last(value) %>% paste0("$ ", .)) %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Iso2c)),
         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 .}

2010, 2019

Code
NY.GDP.PCAP.PP.CD %>%
  left_join(iso2c, by = "iso2c") %>%
  group_by(Iso2c) %>%
  summarise(`GDP/cap, PPP 2010` = round(value[year == 2010]) %>% paste0("$ ", .),
            `GDP/cap, PPP 2019` = round(value[year == 2019]) %>% paste0("$ ", .)) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Iso2c)),
         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 .}

Japan

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("JP")) %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  ggplot(.) + geom_line(aes(x = date, y = value)) +
  xlab("") + ylab("GDP per capita, PPP") + theme_minimal() +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.2)) +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200000, 10000),
                     labels = dollar_format())

Euro Area vs. US

Base 100

Code
NY.GDP.PCAP.PP.CD %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  filter(iso2c %in% c("XC", "US"),
         date >= as.Date("2008-01-01")) %>%
  group_by(iso2c) %>%
  arrange(date) %>%
  mutate(value = 100*value/value[1]) %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "US", color2, color)) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = value, color = color)) +
  add_2flags +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(70, 200, 5)) + 
  xlab("") + ylab("PIB/habitant en $ (100 = 2008)")

Avec dollars

Code
NY.GDP.PCAP.PP.CD %>%
  left_join(iso2c, by = "iso2c") %>%
  year_to_date %>%
  filter(iso2c %in% c("XC", "US"),
         date >= as.Date("2008-01-01")) %>%
  group_by(iso2c) %>%
  arrange(date) %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "US", color2, color)) %>%
  ungroup %>%
  mutate(dollar = value,
         value = 100*value/value[2]) %>%
  ggplot(.) + theme_minimal() + scale_color_identity() +
  geom_line(aes(x = date, y = value, color = color)) + add_2flags +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 300, 5)) + 
  xlab("") + ylab("PIB/habitant en $ (100 = Zone Euro, 2008)") + 
  geom_text_repel(data = . %>% filter(year(date) %in% seq(2008, 2022, 2)),
                                      aes(x = date, y = value, label = paste0("$", round(dollar, digits = -2), " /hab")))

Euro area vs. US vs. France

Linear

Code
NY.GDP.PCAP.PP.CD %>%
  # XC: Euro area
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  year_to_date %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "XC", color2, color)) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 5000),
                labels = dollar_format(acc = 1))

Base 100 = 1960

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  year_to_date %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "XC", color2, color)) %>%
  group_by(iso2c, Iso2c) %>%
  arrange(date) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP, 100 = 1960") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 400, 10))

Base 100 = 1990

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  year_to_date %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "XC", color2, color)) %>%
  group_by(iso2c, Iso2c) %>%
  arrange(date) %>%
  filter(date >= as.Date("1990-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP, 100 = 1990") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(100, 400, 10))

Base 100 = 2006

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  year_to_date %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "XC", color2, color)) %>%
  group_by(iso2c, Iso2c) %>%
  arrange(date) %>%
  filter(date >= as.Date("2006-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP, 100 = 2006") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 400, 5))

Base 100 = 2007

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  year_to_date %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "XC", color2, color)) %>%
  group_by(iso2c, Iso2c) %>%
  arrange(date) %>%
  filter(date >= as.Date("2007-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP, 100 = 2007") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 400, 5))

Base 100 = 2008

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c = ifelse(iso2c == "XC", "Europe", Iso2c)) %>%
  year_to_date %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(color = ifelse(iso2c == "XC", color2, color)) %>%
  group_by(iso2c, Iso2c) %>%
  arrange(date) %>%
  filter(date >= as.Date("2008-01-01")) %>%
  mutate(value = 100*value/value[1]) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP, 100 = 2008") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10, 400, 5))

GDP Per capita - PPP VS current (USD)

Tous

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = case_when(iso2c == "US" ~ "Etats-Unis",
                            iso2c == "XC" ~ "Zone Euro",
                            iso2c == "FR" ~ "France"),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ "PIB/hab en PPA ",
                               variable == "NY.GDP.PCAP.CD" ~ "PIB/hab")) %>%
  year_to_date %>%
  #filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + 
  geom_line(aes(x = date, y = value, color = Iso2c2, linetype = variable2)) + 
  scale_color_manual(values = c("#3C3B6E", "#ED2939", "#FFCC00")) +
  scale_linetype_manual(values = c("dashed", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

1990-

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = case_when(iso2c == "US" ~ "Etats-Unis",
                            iso2c == "XC" ~ "Zone Euro",
                            iso2c == "FR" ~ "France"),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ "PIB/habitant en Parité de Pouvoir d'Achat ",
                               variable == "NY.GDP.PCAP.CD" ~ "PIB/habitant")) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + 
  geom_line(aes(x = date, y = value, color = Iso2c2, linetype = variable2)) + 
  scale_color_manual(values = c("#3C3B6E", "#ED2939", "#FFCC00")) +
  scale_linetype_manual(values = c("dashed", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.25, 0.8)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

1999-

Linear

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = case_when(iso2c == "US" ~ "Etats-Unis",
                            iso2c == "XC" ~ "Zone Euro",
                            iso2c == "FR" ~ "France"),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ "PIB/hab en PPA ",
                               variable == "NY.GDP.PCAP.CD" ~ "PIB/hab")) %>%
  year_to_date %>%
  filter(date >= as.Date("1999-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + 
  geom_line(aes(x = date, y = value, color = Iso2c2, linetype = variable2)) + 
  scale_color_manual(values = c("#3C3B6E", "#ED2939", "#FFCC00")) +
  scale_linetype_manual(values = c("dashed", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.7)) +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(2002, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Log

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("US", "XC", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = case_when(iso2c == "US" ~ "Etats-Unis",
                            iso2c == "XC" ~ "Zone Euro",
                            iso2c == "FR" ~ "France"),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ "PIB/hab en PPA ",
                               variable == "NY.GDP.PCAP.CD" ~ "PIB/hab")) %>%
  year_to_date %>%
  filter(date >= as.Date("1999-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + 
  geom_line(aes(x = date, y = value, color = Iso2c2, linetype = variable2)) + 
  scale_color_manual(values = c("#3C3B6E", "#ED2939", "#FFCC00")) +
  scale_linetype_manual(values = c("dashed", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.7)) +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(2002, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Germany, France

All

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("DE", "FR")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  mutate(value = value) %>%
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_2flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(10000, 70000, 10000), seq(10000, 60000, 5000)),
                labels = dollar_format(acc = 1))

GDP Per capita - PPP VS current (USD)

Log

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("DE", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = gsub("Germany", "Allemagne", Iso2c),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ paste0("PIB/hab en PPA - ", Iso2c2),
                               variable == "NY.GDP.PCAP.CD" ~ paste0("PIB/hab - ", Iso2c2))) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + add_4flags +
  geom_line(aes(x = date, y = value, color = variable2, linetype = variable2)) + 
  scale_color_manual(values = c("#000000", "#ED2939", "#000000", "#ED2939")) +
  scale_linetype_manual(values = c("dashed", "dashed", "solid", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Linear

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("DE", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = gsub("Germany", "Allemagne", Iso2c),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ paste0("PIB/hab en PPA - ", Iso2c2),
                               variable == "NY.GDP.PCAP.CD" ~ paste0("PIB/hab - ", Iso2c2))) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + add_4flags +
  geom_line(aes(x = date, y = value, color = variable2, linetype = variable2)) + 
  scale_color_manual(values = c("#000000", "#ED2939", "#000000", "#ED2939")) +
  scale_linetype_manual(values = c("dotted", "dotted", "solid", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Greece, Turkey

All

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("GR", "TR")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_2flags +
  scale_x_date(breaks = seq(1950, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(10000, 70000, 10000), seq(10000, 60000, 5000)),
                labels = dollar_format(acc = 1))

Greece, France

All

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("GR", "FR")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_2flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(10000, 70000, 10000), seq(10000, 60000, 5000)),
                labels = dollar_format(acc = 1))

GDP Per capita - PPP VS current (USD)

Log

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("GR", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = gsub("Germany", "Allemagne", Iso2c),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ paste0("PIB/hab en PPA - ", Iso2c2),
                               variable == "NY.GDP.PCAP.CD" ~ paste0("PIB/hab - ", Iso2c2))) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + add_4flags +
  geom_line(aes(x = date, y = value, color = variable2, linetype = variable2)) + 
  scale_color_manual(values = c("#ED2939", "#0D5EAF", "#ED2939", "#0D5EAF")) +
  scale_linetype_manual(values = c("dashed", "dashed", "solid", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Linear

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("GR", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = gsub("Germany", "Allemagne", Iso2c),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ paste0("PIB/hab en PPA - ", Iso2c2),
                               variable == "NY.GDP.PCAP.CD" ~ paste0("PIB/hab - ", Iso2c2))) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + add_4flags +
  geom_line(aes(x = date, y = value, color = variable2, linetype = variable2)) + 
  scale_color_manual(values = c("#ED2939", "#0D5EAF", "#ED2939", "#0D5EAF")) +
  scale_linetype_manual(values = c("dotted", "dotted", "solid", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Switzerland, France

All

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("CH", "FR")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_2flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(10000, 70000, 10000), seq(10000, 50000, 5000)),
                labels = dollar_format(acc = 1))

GDP Per capita - PPP VS current (USD)

Log

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("CH", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = gsub("Switzerland", "Suisse", Iso2c),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ paste0("PIB/hab en PPA - ", Iso2c2),
                               variable == "NY.GDP.PCAP.CD" ~ paste0("PIB/hab - ", Iso2c2))) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + add_4flags +
  geom_line(aes(x = date, y = value, color = variable2, linetype = variable2)) + 
  scale_color_manual(values = c("#002395", "#FF0000", "#002395", "#FF0000")) +
  scale_linetype_manual(values = c("dashed", "dashed", "solid", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

Linear

Code
NY.GDP.PCAP.PP.CD %>%
  bind_rows(NY.GDP.PCAP.CD) %>%
  filter(iso2c %in% c("CH", "FR")) %>%
  left_join(iso2c, by = "iso2c") %>%
  mutate(Iso2c2 = gsub("Switzerland", "Suisse", Iso2c),
         variable2 = case_when(variable == "NY.GDP.PCAP.PP.CD" ~ paste0("PIB/hab en PPA - ", Iso2c2),
                               variable == "NY.GDP.PCAP.CD" ~ paste0("PIB/hab - ", Iso2c2))) %>%
  year_to_date %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("PIB Par habitant") + theme_minimal() + add_4flags +
  geom_line(aes(x = date, y = value, color = variable2, linetype = variable2)) + 
  scale_color_manual(values = c("#002395", "#FF0000", "#002395", "#FF0000")) +
  scale_linetype_manual(values = c("dashed", "dashed", "solid", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.85)) +
  scale_x_date(breaks = seq(1950, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 200000, 5000),
                     labels = dollar_format(a = 1))

China, France, Germany

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("CN", "FR", "DE")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10000, 100000, 5000),
                labels = dollar_format(acc = 1))

Italy, Portugal, Spain

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("ES", "IT", "PT")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10000, 100000, 5000),
                labels = dollar_format(acc = 1))

Spain, United Kingdom, United States

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("US", "GB", "ES")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10000, 100000, 5000),
                labels = dollar_format(acc = 1))

Argentina, Chile, Venezuela

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("AR", "CL", "VE")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = c(seq(1000, 10000, 1000), seq(10000, 50000, 5000)),
                labels = dollar_format(acc = 1))

Greece, Hong Kong, Mexico

Code
NY.GDP.PCAP.PP.CD %>%
  filter(iso2c %in% c("GR", "HK", "MX")) %>%
  year_to_date %>%
  left_join(iso2c, by = "iso2c") %>%
  left_join(colors, by = c("Iso2c" = "country")) %>%
  
  ggplot(.) + xlab("") + ylab("GDP per capita, PPP") +
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_3flags +
  scale_x_date(breaks = seq(1950, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = seq(10000, 100000, 5000),
                labels = dollar_format(acc = 1))