Main Balance of Payments and International Investment Position items as share of GDP (BPM6)

Data - Eurostat

Info

source dataset .html .RData
eurostat bop_gdp6_q 2024-11-01 2024-10-09

Data on europe

source dataset .html .RData
eurostat bop_gdp6_q 2024-11-01 2024-10-09
eurostat nama_10_a10 2024-11-01 2024-10-08
eurostat nama_10_a10_e 2024-11-01 2024-11-05
eurostat nama_10_gdp 2024-11-01 2024-10-08
eurostat nama_10_lp_ulc 2024-11-01 2024-10-08
eurostat namq_10_a10 2024-11-01 2024-11-05
eurostat namq_10_a10_e 2024-11-01 2024-10-08
eurostat namq_10_gdp 2024-11-01 2024-10-08
eurostat namq_10_lp_ulc 2024-11-04 2024-11-04
eurostat namq_10_pc 2024-11-01 2024-10-08
eurostat nasa_10_nf_tr 2024-11-01 2024-10-08
eurostat nasq_10_nf_tr 2024-11-01 2024-10-09
eurostat tipsii40 2024-11-01 2024-11-01

Data on macro

source dataset .html .RData
eurostat nama_10_a10 2024-11-01 2024-10-08
eurostat nama_10_a10_e 2024-11-01 2024-11-05
eurostat nama_10_gdp 2024-11-01 2024-10-08
eurostat nama_10_lp_ulc 2024-11-01 2024-10-08
eurostat namq_10_a10 2024-11-01 2024-11-05
eurostat namq_10_a10_e 2024-11-01 2024-10-08
eurostat namq_10_gdp 2024-11-01 2024-10-08
eurostat namq_10_lp_ulc 2024-11-04 2024-11-04
eurostat namq_10_pc 2024-11-01 2024-10-08
eurostat nasa_10_nf_tr 2024-11-01 2024-10-08
eurostat nasq_10_nf_tr 2024-11-01 2024-10-09
fred gdp 2024-11-01 2024-11-01
oecd QNA 2024-06-06 2024-06-30
oecd SNA_TABLE1 2024-09-15 2024-06-30
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-10-15 2024-10-15
wdi NY.GDP.PCAP.KD 2024-09-18 2024-09-18
wdi NY.GDP.PCAP.PP.CD 2024-10-15 2024-10-15
wdi NY.GDP.PCAP.PP.KD 2024-09-18 2024-09-18

LAST_COMPILE

LAST_COMPILE
2024-11-05

Last

Code
bop_gdp6_q %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2024Q2 3194

unit

Code
bop_gdp6_q %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
unit Unit Nobs
PC_GDP Percentage of gross domestic product (GDP) 520943
PC_GDP_3Y Percentage of GDP - three-year average 40702

s_adj

Code
bop_gdp6_q %>%
  left_join(s_adj, by = "s_adj") %>%
  group_by(s_adj, S_adj) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
s_adj S_adj Nobs
NSA Unadjusted data (i.e. neither seasonally adjusted nor calendar adjusted data) 552066
SCA Seasonally and calendar adjusted data 9579

bop_item

Code
bop_gdp6_q %>%
  left_join(bop_item, by = "bop_item") %>%
  group_by(bop_item, Bop_item) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
bop_item Bop_item Nobs
S Services 86141
G Goods 85443
GS Goods and services 82848
FA__D__F Financial account; Direct Investment 61149
IN2 Secondary income 49483
KA Capital account 49006
FA__P__F Financial account; Portfolio Investment 31318
FA Financial account 30663
CA Current account 21632
IN1 Primary income 21125
CKA Current plus capital account (balance = Net lending (+) / net borrowing (-)) 20583
S_X_CG Services excluding Transport and Financial services 14222
FA__FNED Net external debt 4277
FA__NENDI Net international investment position excluding non-defaultable instruments 3515
FA__TXR__F Financial account excluding reserve assets 240

stk_flow

Code
bop_gdp6_q %>%
  left_join(stk_flow, by = "stk_flow") %>%
  group_by(stk_flow, Stk_flow) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
stk_flow Stk_flow Nobs
CRE Credit 111779
DEB Debit 102585
BAL Balance 102233
CRE_DEB_SUM Sum of credits and debits 62431
CRE_DEB_AVG Average of credits and debits 51576
ASS Assets 30412
NET Net 26218
LIAB Liabilities 25920
N_LE Net positions at the end of period 17374
A_LE Assets - positions at the end of period 14061
L_LE Liabilities - positions at the end of period 13469
NE_LE Net liabilities (liabilities minus assets) 3587

partner

Code
bop_gdp6_q %>%
  left_join(partner, by = "partner") %>%
  group_by(partner, Partner) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  mutate(Partner = ifelse(partner == "DE", "Germany", Partner)) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Partner)),
         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 .}

geo

Code
bop_gdp6_q %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

time

Code
bop_gdp6_q %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

France, Germany, Italy

Last

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  quarter_to_date %>%
  filter(geo %in% c("FR", "DE", "IT"),
         date == max(date, na.rm = T),
         !(stk_flow %in% c("CRE", "DEB"))) %>%
  left_join(geo, by = "geo") %>%
  left_join(bop_item, by = "bop_item") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select(-geo) %>%
  spread(Geo, values) %>%
  select_if(~ n_distinct(.) > 1) %>%
  arrange(France) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Germany, Spain, France, Italy, Netherlands, Europe

Current account Balance

All

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "CA",
         s_adj == "NSA",
         stk_flow == "BAL") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_6flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Current account balance") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
                     labels = scales::percent_format(accuracy = 1))

2006-

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "CA",
         s_adj == "NSA",
         stk_flow == "BAL") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  filter(date >=as.Date("2006-01-01")) %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_6flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Current account balance") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
                     labels = scales::percent_format(accuracy = 1))

2012-

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "CA",
         s_adj == "NSA",
         stk_flow == "BAL") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  filter(date >=as.Date("2012-01-01")) %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_6flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 1), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Current account balance") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
                     labels = scales::percent_format(accuracy = 1))

Net Investment Positions (FA__NENDI)

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "FA__NENDI",
         s_adj == "NSA") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_5flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 5), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Net international investment positions (% of GDP)") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 10),
                     labels = scales::percent_format(accuracy = 1))

Goods and Services

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "GS",
         s_adj == "NSA",
         stk_flow == "BAL") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_6flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 5), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Goods and Services") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
                     labels = scales::percent_format(accuracy = 1))

Goods

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "G",
         s_adj == "NSA",
         stk_flow == "BAL") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_6flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 5), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Goods") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
                     labels = scales::percent_format(accuracy = 1))

Services

Code
bop_gdp6_q %>%
  filter(freq == "Q") %>%
  filter(((geo %in% c("DE", "ES", "FR", "IT", "NL", "EA20")) & partner == "WRL_REST") |
           (geo == "EA20" & partner == "EXT_EA20"),
         unit == "PC_GDP",
         bop_item == "S",
         s_adj == "NSA",
         stk_flow == "BAL") %>%
  left_join(geo, by = "geo") %>%
  left_join(stk_flow, by = "stk_flow") %>%
  select_if(~ n_distinct(.) > 1) %>%
  quarter_to_date %>%
  mutate(Geo = ifelse(geo == "EA20", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_6flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 5), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Services") +
  scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
                     labels = scales::percent_format(accuracy = 1))