Quarterly National Accounts, GDP Per Capita

Data - OECD

Info

source dataset .html .RData

oecd

QNA_EXPENDITURE_CAPITA

2024-10-15 2024-10-29

Last

obsTime

obsTime Nobs
2024-Q2 72

obsValue

FREQ

Code
QNA_EXPENDITURE_CAPITA %>%
  left_join(FREQ, by = "FREQ") %>%
  group_by(FREQ, Freq) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
FREQ Freq Nobs
Q Quarterly 11682
A Annual 3031

REF_AREA

Code
QNA_EXPENDITURE_CAPITA %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  group_by(REF_AREA, Ref_area) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()

TRANSACTION

Code
QNA_EXPENDITURE_CAPITA %>%
  left_join(TRANSACTION, by = "TRANSACTION") %>%
  group_by(TRANSACTION, Transaction) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
TRANSACTION Transaction Nobs
B1GQ_POP Gross domestic product, per capita 14713

PRICE_BASE

Code
QNA_EXPENDITURE_CAPITA %>%
  left_join(PRICE_BASE, by = "PRICE_BASE") %>%
  group_by(PRICE_BASE, Price_base) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
PRICE_BASE Price_base Nobs
V Prix courants 7359
LR Volumes chaînés (rebasés) 7354

U.S., Europe

1995-

Code
metadata_load_fr("REF_AREA", "CL_AREA")
plot <- QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1995-01-01")) %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Zone euro", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  #mutate(color = ifelse(REF_AREA == "USA", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (1995T1 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = Ref_area)) + 
  # #003399, #3C3B6E
  scale_color_manual(values = c("#B22234", "#003399")) +
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#B22234', alpha = 0.1)  +
  geom_rect(data = cepr_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#003399', alpha = 0.1)  +
  scale_x_date(breaks = c(seq(1994, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.26, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(50, 200, 5))

plot

Code
save(plot, file = "QNA_EXPENDITURE_CAPITA_files/figure-html/USA-EA20-1995-1.RData")

1999-

Flags

Code
metadata_load("REF_AREA", "CL_AREA")
plot <- QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1999-01-01")) %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  #mutate(color = ifelse(REF_AREA == "USA", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("GDP per capita") +
  geom_line(aes(x = date, y = obsValue, color = Ref_area)) + 
  # #003399, #3C3B6E
  scale_color_manual(values = c("#003399", "#B22234")) + add_2flags +
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#B22234', alpha = 0.1)  +
  geom_rect(data = cepr_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#003399', alpha = 0.1)  +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.26, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(50, 200, 5))

plot

No flags

Code
metadata_load_fr("REF_AREA", "CL_AREA")
plot <- QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1999-01-01")) %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Zone euro", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  ungroup %>%
  add_row(obsValue = 127.9913, date = as.Date("2024-04-01"), Ref_area = "Zone euro") %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  #mutate(color = ifelse(REF_AREA == "USA", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("") +
  geom_line(aes(x = date, y = obsValue, color = Ref_area)) + 
  # #003399, #3C3B6E
  scale_color_manual(values = c("#B22234", "#003399")) +
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#B22234', alpha = 0.1)  +
  geom_rect(data = cepr_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#003399', alpha = 0.1)  +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.26, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(50, 200, 5)) +
  labs(caption = "")

plot

Code
save(plot, file = "QNA_EXPENDITURE_CAPITA_files/figure-html/USA-EA20-1999-1.RData")

2000-

Code
metadata_load_fr("REF_AREA", "CL_AREA")
plot <- QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Zone euro", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (2000T1 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = Ref_area)) + 
  # #003399, #3C3B6E
  scale_color_manual(values = c("#B22234", "#003399")) +
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf),
            fill = '#B22234', alpha = 0.1)  +
  geom_rect(data = cepr_recessions %>%
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = '#003399', alpha = 0.1)  +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.26, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(50, 200, 5))

plot

Code
save(plot, file = "QNA_EXPENDITURE_CAPITA_files/figure-html/USA-EA20-2000-1.RData")

U.S., Europe, France, Germany

1995-

Code
metadata_load("REF_AREA", "CL_AREA")
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "FRA", "DEU"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1995-01-01")) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (1995 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_4flags +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

U.S., Europe, France, Italy

1995-

Code
metadata_load("REF_AREA", "CL_AREA")
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "FRA", "ITA"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1995-01-01")) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (1995 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_4flags +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

1999-

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "FRA", "ITA"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1999-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (1999 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_4flags +
  scale_color_identity() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

2000-

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "FRA", "ITA"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (2000 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_4flags +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

Avril 2017-

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "FRA", "ITA"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2017-04-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (Avril 2017 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_4flags +
  scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

Oher graphs

1999-

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "ITA"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("1999-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (1999 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_3flags +
  scale_color_identity() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

1999-

french

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("PIB par habitant (2000 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_2flags +
  scale_color_identity() +
  scale_x_date(breaks = c(seq(2000, 2100, 2)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

english

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[1]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("GDP per capita (2000 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_2flags +
  scale_color_identity() +
  scale_x_date(breaks = c(seq(2000, 2100, 2)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

US, Europe, Greece

2000-

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "GRC", "ESP"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area),
         Ref_area = ifelse(REF_AREA == "OECD", "OECD members", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[date == as.Date("2008-01-01")]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  mutate(color = ifelse(REF_AREA == "ESP", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("GDP per capita (2000 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_4flags +
  scale_color_identity() +
  scale_x_date(breaks = c(seq(2000, 2100, 2)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))

US, Europe, OECD

2000-

Code
QNA_EXPENDITURE_CAPITA %>%
  filter(REF_AREA %in% c("USA", "EA20", "OECD"),
         FREQ == "Q",
         PRICE_BASE == "LR") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  quarter_to_date %>%
  filter(date >= as.Date("2000-01-01")) %>%
  rename(Ref_area = Ref_area) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area),
         Ref_area = ifelse(REF_AREA == "OECD", "OECD members", Ref_area)) %>%
  group_by(Ref_area) %>%
  arrange(date) %>%
  mutate(obsValue = 100 * obsValue / obsValue[date == as.Date("2008-01-01")]) %>%
  left_join(colors, by = c("Ref_area" = "country")) %>%
  mutate(color = ifelse(REF_AREA == "EA20", color2, color)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("GDP per capita (2000 = 100)") +
  geom_line(aes(x = date, y = obsValue, color = color)) + add_3flags +
  scale_color_identity() +
  scale_x_date(breaks = c(seq(2000, 2100, 2)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = "none") +
  scale_y_log10(breaks = seq(50, 200, 5))