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.925 53.430 5.179 7.906 21.151
FA__D__F Financial account; direct investment 13.875 3.680 0.356 1.407 1.114
FA__O__F Financial account; other investment 19.892 14.643 50.024 27.112 38.107
FA__P__F Financial account; portfolio investment -64.148 11.626 -46.889 -30.732 -21.853