| source | dataset | .html | .qmd | .RData |
|---|---|---|---|---|
| eurostat | tipsii10 | 2025-10-11 | 2025-10-01 | 2025-10-26 |
Net international investment position - annual data
Data - Eurostat
Info
DOWNLOAD_TIME
Code
tibble(DOWNLOAD_TIME = as.Date(file.info("~/iCloud/website/data/eurostat/tipsii10.RData")$mtime)) %>%
print_table_conditional()| DOWNLOAD_TIME |
|---|
| 2025-10-26 |
Last
Code
tipsii10 %>%
group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()| time | Nobs |
|---|---|
| 2024 | 57 |
geo
Code
tipsii10 %>%
left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
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 .}unit
Code
tipsii10 %>%
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) | 704 |
| MIO_NAC | Million units of national currency | 689 |
time
Code
tipsii10 %>%
group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
print_table_conditional()| time | Nobs |
|---|---|
| 2024 | 57 |
| 2023 | 57 |
| 2022 | 57 |
| 2021 | 57 |
| 2020 | 57 |
| 2019 | 57 |
| 2018 | 57 |
| 2017 | 57 |
| 2016 | 57 |
| 2015 | 57 |
| 2014 | 57 |
| 2013 | 57 |
| 2012 | 54 |
| 2011 | 54 |
| 2010 | 54 |
| 2009 | 54 |
| 2008 | 54 |
| 2007 | 54 |
| 2006 | 54 |
| 2005 | 54 |
| 2004 | 48 |
| 2003 | 40 |
| 2002 | 36 |
| 2001 | 32 |
| 2000 | 32 |
| 1999 | 30 |
| 1998 | 18 |
| 1997 | 15 |
| 1996 | 15 |
| 1995 | 11 |
Table
Code
tipsii10 %>%
filter(unit == "PC_GDP",
time == "2020") %>%
select_if(~ n_distinct(.) > 1) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, values) %>%
arrange(-values) %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
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 .}France, Germany, Italy, Belgium, Netherlands
Code
tipsii10 %>%
filter(geo %in% c("DE", "BE", "FR", "IT", "NL", "ES"),
unit == "PC_GDP") %>%
year_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, 2030, 2), "-01-01")),
labels = date_format("%Y")) +
xlab("") + ylab("Net international investment position - annual data") +
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
Code
tipsii10 %>%
filter(geo %in% c("DE", "ES", "FR", "IT", "NL"),
unit == "PC_GDP") %>%
year_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, 2030, 2), "-01-01")),
labels = date_format("%Y")) +
xlab("") + ylab("Net international investment position - annual data") +
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")