Financial account - quarterly data - ei_bpm6fa_q

Data - Eurostat

Structure

Financial Account Balance (vs. Rest of the World)

France, Germany, Italy, Spain

Code
ei_bpm6fa_q |>
  filter(geo %in% c("FR", "DE", "IT", "ES"),
         stk_flow == "NET",
         bop_item == "FA",
         partner == "WRL_REST") |>
  quarter_to_date() |>
  add_flag_color("Geo") |>
  mutate(values = values/1000) |>
  ggplot() + geom_line(aes(x = date, y = values, color = color)) +
  theme_minimal() + scale_color_identity() + add_flags +
  scale_x_date(breaks = as.Date(paste0(seq(1990, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Financial account balance (Bn€)") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

France: By Investment Type

Code
ei_bpm6fa_q |>
  filter(geo == "FR",
         stk_flow == "NET",
         bop_item %in% c("FA__D__F", "FA__P__F", "FA__O__F"),
         partner == "WRL_REST") |>
  quarter_to_date() |>
  mutate(values = values/1000) |>
  ggplot() + geom_line(aes(x = date, y = values, color = Bop_item)) +
  theme_minimal() +
  scale_x_date(breaks = as.Date(paste0(seq(1990, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank()) +
  xlab("") + ylab("Financial account balance (Bn€)") +
  geom_hline(yintercept = 0, linetype = "dashed", color = "black")

Latest Quarter by Country

Code
latest_q <- ei_bpm6fa_q |>
  filter(stk_flow == "NET",
         bop_item == "FA",
         partner == "WRL_REST",
         !is.na(values)) |>
  summarise(m = max(time)) |>
  pull(m)

ei_bpm6fa_q |>
  filter(geo %in% c("FR", "DE", "IT", "ES", "NL", "EA20"),
         stk_flow == "NET",
         partner == "WRL_REST",
         bop_item %in% c("FA", "FA__D__F", "FA__P__F", "FA__O__F"),
         time == latest_q) |>
  mutate(values = values/1000) |>
  select(bop_item, Bop_item, Geo, values) |>
  spread(Geo, values) |>
  print_table_conditional()
bop_item Bop_item France Germany Italy Netherlands Spain
FA Financial account 0.867 29.242 -14.818 25.728 1.692
FA__D__F Financial account; direct investment 23.516 11.647 4.475 5.931 1.846
FA__O__F Financial account; other investment 15.396 -14.522 -22.775 16.902 -3.220
FA__P__F Financial account; portfolio investment -41.655 2.899 0.624 -5.550 5.560