Net international investment position - quarterly data, % of GDP

Data - Eurostat


Info

source dataset .html .RData

eurostat

tipsii40

2024-06-24 2024-06-30

Data on europe

Code
load_data("europe.RData")
europe %>%
  source_dataset_file_updates()
source dataset .html .RData

eurostat

bop_gdp6_q

2024-07-01 2024-06-30

eurostat

nama_10_a10

2024-07-01 2024-06-30

eurostat

nama_10_a10_e

2024-07-01 2024-06-30

eurostat

nama_10_gdp

2024-07-01 2024-06-30

eurostat

nama_10_lp_ulc

2024-07-01 2024-06-30

eurostat

namq_10_a10

2024-07-01 2024-06-30

eurostat

namq_10_a10_e

2024-07-01 2024-06-30

eurostat

namq_10_gdp

2024-07-01 2024-06-30

eurostat

namq_10_lp_ulc

2024-07-01 2024-06-30

eurostat

namq_10_pc

2024-07-01 2024-06-30

eurostat

nasa_10_nf_tr

2024-07-01 2024-06-30

eurostat

nasq_10_nf_tr

2024-07-01 2024-06-30

eurostat

tipsii40

2024-06-24 2024-06-30

LAST_COMPILE

LAST_COMPILE
2024-07-01

Last

time Nobs
2023Q4 27

geo

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

unit

Code
tipsii40 %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
PC_GDP Percentage of gross domestic product (GDP) 2527

France, Germany, Italy, Belgium, Netherlands, Spain, Greece

Code
tipsii40 %>%
  filter(geo %in% c("DE", "BE", "FR", "IT", "NL", "ES", "EL"),
         unit == "PC_GDP") %>%
  quarter_to_date %>%
  left_join(geo, by = "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_7flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Net international investment position") +
  scale_y_continuous(breaks = 0.01*seq(-300, 200, 20),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = 0, linetype = "solid")

France, Germany, Italy, Belgium, Netherlands

Code
tipsii40 %>%
  filter(geo %in% c("DE", "BE", "FR", "IT", "NL", "ES"),
         unit == "PC_GDP") %>%
  quarter_to_date %>%
  left_join(geo, by = "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("Net international investment position") +
  scale_y_continuous(breaks = 0.01*seq(-300, 200, 10),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = -0.35, linetype = "dashed") +
  geom_hline(yintercept = 0, linetype = "solid")

France, Germany, Italy, Spain, Netherlands

All

Code
tipsii40 %>%
  filter(geo %in% c("DE", "ES", "FR", "IT", "NL"),
         unit == "PC_GDP") %>%
  quarter_to_date %>%
  left_join(geo, by = "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, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Net international investment position") +
  scale_y_continuous(breaks = 0.01*seq(-300, 200, 20),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = -0.35, linetype = "dashed") +
  geom_hline(yintercept = 0, linetype = "solid")

2000-

Code
tipsii40 %>%
  filter(geo %in% c("DE", "ES", "FR", "IT", "NL"),
         unit == "PC_GDP") %>%
  quarter_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  filter(date >= as.Date("2000-01-01")) %>%
  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, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Net international investment position") +
  scale_y_continuous(breaks = 0.01*seq(-300, 200, 20),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = -0.35, linetype = "dashed") +
  geom_hline(yintercept = 0, linetype = "solid")

2010-

Code
tipsii40 %>%
  filter(geo %in% c("DE", "ES", "FR", "IT", "NL"),
         unit == "PC_GDP") %>%
  quarter_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  filter(date >= as.Date("2010-01-01")) %>%
  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, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Net international investment position") +
  scale_y_continuous(breaks = 0.01*seq(-300, 200, 20),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = -0.35, linetype = "dashed") +
  geom_hline(yintercept = 0, linetype = "solid")

2017-

Code
tipsii40 %>%
  filter(geo %in% c("DE", "ES", "FR", "IT", "NL"),
         unit == "PC_GDP") %>%
  quarter_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  filter(date >= as.Date("2017-01-01")) %>%
  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, 1), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Net international investment position") +
  scale_y_continuous(breaks = 0.01*seq(-300, 200, 20),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = -0.35, linetype = "dashed") +
  geom_hline(yintercept = 0, linetype = "solid")