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-06-23 2024-06-30

Data on europe

source dataset .html .RData

eurostat

bop_gdp6_q

2024-06-23 2024-06-30

eurostat

nama_10_a10

2024-06-23 2024-06-30

eurostat

nama_10_a10_e

2024-06-23 2024-06-30

eurostat

nama_10_gdp

2024-06-24 2024-06-30

eurostat

nama_10_lp_ulc

2024-06-24 2024-06-30

eurostat

namq_10_a10

2024-06-24 2024-06-30

eurostat

namq_10_a10_e

2024-06-24 2024-06-30

eurostat

namq_10_gdp

2024-06-24 2024-06-30

eurostat

namq_10_lp_ulc

2024-06-24 2024-06-30

eurostat

namq_10_pc

2024-06-24 2024-06-30

eurostat

nasa_10_nf_tr

2024-06-24 2024-06-30

eurostat

nasq_10_nf_tr

2024-06-24 2024-06-30

eurostat

tipsii40

2024-06-24 2024-06-30

Data on macro

source dataset .html .RData

eurostat

nama_10_a10

2024-06-23 2024-06-30

eurostat

nama_10_a10_e

2024-06-23 2024-06-30

eurostat

nama_10_gdp

2024-06-24 2024-06-30

eurostat

nama_10_lp_ulc

2024-06-24 2024-06-30

eurostat

namq_10_a10

2024-06-24 2024-06-30

eurostat

namq_10_a10_e

2024-06-24 2024-06-30

eurostat

namq_10_gdp

2024-06-24 2024-06-30

eurostat

namq_10_lp_ulc

2024-06-24 2024-06-30

eurostat

namq_10_pc

2024-06-24 2024-06-30

eurostat

nasa_10_nf_tr

2024-06-24 2024-06-30

eurostat

nasq_10_nf_tr

2024-06-24 2024-06-30

fred

gdp

2024-06-30 2024-06-30

oecd

QNA

2024-06-06 2024-06-30

oecd

SNA_TABLE1

2024-07-01 2024-06-30

oecd

SNA_TABLE14A

2024-07-01 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-06-20 2024-04-14

wdi

NY.GDP.MKTP.CD

2024-06-20 2024-05-06

wdi

NY.GDP.MKTP.PP.CD

2024-06-20 2024-04-14

wdi

NY.GDP.PCAP.CD

2024-06-20 2024-04-22

wdi

NY.GDP.PCAP.KD

2024-06-20 2024-05-06

wdi

NY.GDP.PCAP.PP.CD

2024-06-20 2024-04-22

wdi

NY.GDP.PCAP.PP.KD

2024-06-20 2024-05-06

LAST_COMPILE

LAST_COMPILE
2024-07-01

Last

Code
bop_gdp6_q %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2023Q4 3804

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) 507336
PC_GDP_3Y Percentage of GDP - three-year average 40698

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) 538551
SCA Seasonally and calendar adjusted data 9483

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 84579
G Goods 83891
GS Goods and services 80766
FA__D__F Financial account; Direct Investment 59897
IN2 Secondary income 48243
KA Capital account 47782
FA__P__F Financial account; Portfolio Investment 30545
FA Financial account 30402
CA Current account 20554
IN1 Primary income 20047
CKA Current plus capital account (balance = Net lending (+) / net borrowing (-)) 19510
S_X_CG Services excluding Transport and Financial services 13888
FA__FNED Net external debt 4178
FA__NENDI Net international investment position excluding non-defaultable instruments 3512
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 107153
DEB Debit 100485
BAL Balance 100121
CRE_DEB_SUM Sum of credits and debits 61059
CRE_DEB_AVG Average of credits and debits 50544
ASS Assets 29509
NET Net 25565
LIAB Liabilities 25263
N_LE Net positions at the end of period 17321
A_LE Assets - positions at the end of period 13976
L_LE Liabilities - positions at the end of period 13451
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))