| source | dataset | Title | Updated |
|---|---|---|---|
| wdi | NY.GDP.PCAP.KD | GDP per capita (constant 2015 USD) | 2026-08-13 |
GDP per capita (constant 2015 USD)
Data - WDI
Info
Last observation: 2025 (N = 14,495)
First observation: 1960 (N = 14,495)
Last data update: 14 aoû 2026, 20:20. Last compile: 14 aoû 2026, 21:09
Info
Data on macro
| source | dataset | Title | Updated |
|---|---|---|---|
| eurostat | nama_10_a10 | Gross value added and income by A*10 industry breakdowns | 2026-08-13 |
| eurostat | nama_10_a10_e | Employment by A*10 industry breakdowns | 2026-08-13 |
| eurostat | nama_10_gdp | GDP and main components (output, expenditure and income) | 2026-08-13 |
| eurostat | nama_10_lp_ulc | Labour productivity and unit labour costs | 2026-08-13 |
| eurostat | namq_10_a10 | Gross value added and income A*10 industry breakdowns | 2026-08-13 |
| eurostat | namq_10_a10_e | Employment A*10 industry breakdowns | 2026-08-13 |
| eurostat | namq_10_gdp | GDP and main components (output, expenditure and income) | 2026-08-13 |
| eurostat | namq_10_lp_ulc | Labour productivity and unit labour costs | 2026-08-13 |
| eurostat | namq_10_pc | Main GDP aggregates per capita | 2026-08-13 |
| eurostat | nasa_10_nf_tr | Non-financial transactions | 2026-08-13 |
| eurostat | nasq_10_nf_tr | Non-financial transactions | 2026-08-13 |
| fred | gdp | Gross Domestic Product | 2026-08-13 |
| oecd | QNA | Quarterly National Accounts | 2026-08-13 |
| oecd | SNA_TABLE1 | Gross domestic product (GDP) | 2026-08-02 |
| oecd | SNA_TABLE14A | Non-financial accounts by sectors | 2026-08-02 |
| oecd | SNA_TABLE2 | Disposable income and net lending - net borrowing | 2026-08-02 |
| oecd | SNA_TABLE6A | Value added and its components by activity, ISIC rev4 | 2026-08-02 |
| wdi | NE.RSB.GNFS.ZS | External balance on goods and services (% of GDP) | 2026-08-13 |
| wdi | NY.GDP.MKTP.CD | GDP (current USD) | 2026-08-13 |
| wdi | NY.GDP.MKTP.PP.CD | GDP, PPP (current international D) | 2026-08-13 |
| wdi | NY.GDP.PCAP.CD | GDP per capita (current USD) | 2026-08-13 |
| wdi | NY.GDP.PCAP.KD | GDP per capita (constant 2015 USD) | 2026-08-13 |
| wdi | NY.GDP.PCAP.PP.CD | GDP per capita, PPP (current international D) | 2026-08-13 |
| wdi | NY.GDP.PCAP.PP.KD | GDP per capita, PPP (constant 2011 international D) | 2026-08-13 |
LAST_COMPILE
| LAST_COMPILE |
|---|
| 2026-08-14 |
Last
Code
NY.GDP.PCAP.KD |>
group_by(year) |>
summarise(Nobs = n()) |>
arrange(desc(year)) |>
head(1) |>
print_table_conditional()| year | Nobs |
|---|---|
| 2025 | 233 |
Nobs - Javascript
Code
NY.GDP.PCAP.KD |>
left_join(iso2c, by = "iso2c") |>
group_by(iso2c, Iso2c) |>
mutate(value = round(value)) %>%
summarise(Nobs = n(),
`Year 1` = first(year),
`GDP per capita (constant 2010 USD) 1` = first(value) %>% paste0("$ ", .),
`Year 2` = last(year),
`GDP per capita (constant 2010 USD) 2` = last(value) %>% paste0("$ ", .)) |>
arrange(-Nobs) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}1990, 2019, growth 1990-2019
Code
NY.GDP.PCAP.KD |>
filter(year %in% c(1990, 2019)) |>
left_join(iso2c, by = "iso2c") |>
spread(year, value) |>
mutate(growth = round(100*(`2019`/`1990`-1),1)) |>
mutate(`1990` = round(`1990`),
`2019` = round(`2019`)) |>
arrange(-growth) |>
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 .}Output - Countries
Png
Code
include_graphics3b("bib/wdi/NY.GDP.PCAP.KD_ex1.png")
United States
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("US")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
filter(date >= as.Date("1971-01-01")) |>
ggplot() + geom_line(aes(x = date, y = value)) +
xlab("") + ylab("GDP per capita (constant 2010 USD)") + 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_log10(breaks = c(23670, 30000, 40000, 53748),
labels = dollar_format(a = 1))
Japan
Code
NY.GDP.PCAP.KD |>
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 (constant 2010 USD)") + 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())
Iceland (1990-2020)
Code
NY.GDP.PCAP.KD |>
year_to_date() |>
filter(iso2c %in% c("IS"),
date >= as.Date("1990-01-01")) |>
left_join(iso2c, by = "iso2c") |>
ggplot() + geom_line(aes(x = date, y = value)) +
xlab("") + ylab("GDP per capita (constant 2010 USD)") + 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, 2000),
labels = dollar_format())
Euro Area vs. US
Base 100
Code
NY.GDP.PCAP.KD |>
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_flags +
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.KD |>
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_flags +
scale_x_date(breaks = seq(1950, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(10, 200, 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
iso2c <- read_parquet("iso2c2.parquet")
NY.GDP.PCAP.KD |>
# 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") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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.KD |>
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, 100 = 1960") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks =c(100, 200, 400, 800, 1000, 2000, 4000, 8000, 10000, 20000))
Base 100 = 1990
Code
NY.GDP.PCAP.KD |>
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, 100 = 1990") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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.KD |>
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, 100 = 2006") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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.KD |>
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, 100 = 2007") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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.KD |>
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, 100 = 2008") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Switzerland, France, Germany
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("CH", "FR", "DE")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("CH", "FR", "DE")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
filter(date >= as.Date("1980-01-01")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(10000, 90000, 10000),
labels = dollar_format(acc = 1))
China, France, Germany
Linear
Code
iso2c <- read_parquet("iso2c.parquet")
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("CN", "FR", "DE")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("CN", "FR", "DE")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = c(100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000),
labels = dollar_format(acc = 1))
Spain, Italy, France, Germany, United States
Log
All
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "FR", "DE", "IT", "US")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(5000, 50000, 5000),
labels = dollar_format(acc = 1))
1990-
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "FR", "DE", "IT", "US")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
filter(date >= as.Date("1990-01-01")) |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(5000, 50000, 5000),
labels = dollar_format(acc = 1))
Spain, Italy, France, Germany
Linear
Code
iso2c <- read_parquet("iso2c.parquet")
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "FR", "DE", "IT")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
All
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "FR", "DE", "IT")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(5000, 50000, 5000),
labels = dollar_format(acc = 1))
1990-
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "FR", "DE", "IT")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
filter(date >= as.Date("1990-01-01")) |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(5000, 50000, 5000),
labels = dollar_format(acc = 1))
Poland, Portugal, Spain
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("PL", "CZ", "FR")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("PL", "CZ", "FR")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 5000),
labels = dollar_format(acc = 1))
Italy, Portugal, Spain
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "IT", "PT")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("ES", "IT", "PT")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 5000),
labels = dollar_format(acc = 1))
Spain, United Kingdom, United States
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("US", "GB", "ES")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("US", "GB", "ES")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 5000),
labels = dollar_format(acc = 1))
Argentina, Chile, Venezuela
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("AR", "CL", "VE")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_continuous(breaks = seq(0, 80000, 2000),
labels = dollar_format(acc = 1))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("AR", "CL", "VE")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 1000),
labels = dollar_format(acc = 1))
Argentina
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("AR")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 1000),
labels = dollar_format(acc = 1))
Argentina, Zimbabwe, Cuba
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("AR", "ZW", "CU")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 1000),
labels = dollar_format(acc = 1))
Base 100
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("AR", "ZW", "CU")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
group_by(iso2c) |>
mutate(value = 100*value/value[date == as.Date("1970-01-01")]) |>
filter(date >= as.Date("1970-01-01")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(40, 2000, 20))
Greece, Hong Kong, Mexico
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("GR", "HK", "MX")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "HK", "Hong Kong", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("GR", "HK", "MX")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "HK", "Hong Kong", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 80000, 5000),
labels = dollar_format(acc = 1))
Singapore, South Korea, Mexico
Linear
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("KR", "SG", "CH")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "KR", "Korea", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
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))
Log
Code
NY.GDP.PCAP.KD |>
filter(iso2c %in% c("KR", "SG", "CH")) |>
left_join(iso2c, by = "iso2c") |>
mutate(Iso2c = ifelse(iso2c == "KR", "Korea", Iso2c)) |>
year_to_date() |>
left_join(colors, by = c("Iso2c" = "country")) |>
ggplot() + xlab("") + ylab("GDP per capita") +
geom_line(aes(x = date, y = value, color = color)) +
theme_minimal() + scale_color_identity() + add_flags +
scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = c(1000, 2000, 3000, 5000, 8000, seq(0, 80000, 10000)),
labels = dollar_format(acc = 1))