Balance des paiements - 6ème manuel

Données - BDF

Info

Structure

source dataset Title .html .rData
bdf BPM6 Balance des paiements - 6ème manuel 2026-07-24 2026-07-24
eurostat bop_iip6_q NA NA NA

Balance des Paiements de la France

Novembre 2024

Source. html pdf

Octobre 2024

Solde des transactions courantes

Code
ig_b("bdf", "FR_Stat_Info_Balance_des_paiements_de_la_France_202410", "balance-courante")

Solde des opérations financières

Code
ig_b("bdf", "FR_Stat_Info_Balance_des_paiements_de_la_France_202410", "solde-des-operations-financieres")

Janvier 2024

Compte Courant

Table

Code
ig_b("bdf", "BDP_FRA_2284_fr__BDP_Stat_Info_janvier_2024_FR", "table1")

Figure

Code
ig_b("bdf", "BDP_FRA_2284_fr__BDP_Stat_Info_janvier_2024_FR", "figure1")

Compte Financier

Table

Code
ig_b("bdf", "BDP_FRA_2284_fr__BDP_Stat_Info_janvier_2024_FR", "table2")

Figure

Code
ig_b("bdf", "BDP_FRA_2284_fr__BDP_Stat_Info_janvier_2024_FR", "figure2")

Novembre 2021

Code
ig_b("bdf", "bdp_fra_2241_fr_bdp_stat_info_septembre_2021_fr", "comptes")

Mai 2020

Code
ig_b("bdf", "BPM6-2021-07")

Novembre 2020

Code
ig_b("bdf", "BPM6-2020-11-compte")

Compte financier vs compte courant, Différence

Compte financier et compte courant

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.N.FR.W1.S1.S1.T.N.FA._T.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.M.S.FR.W1.S1.S1.T.B.CA._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  
  group_by(Accounting_entry) %>%
  arrange(date) %>%
  mutate(value = zoo::rollsum(x = value, 12, align = "right", fill = NA)) %>%
  na.omit %>%
  mutate(Int_acc_item = ifelse(Int_acc_item == "Transactions courantes", "Compte de transactions courantes", Int_acc_item)) %>%
   ggplot + geom_line(aes(x = date, y = value/1000, color = Int_acc_item)) +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  scale_y_continuous(labels = dollar_format(pre = "", su = " Md€"),
                     breaks = seq(-300000, 300000, 10000)/1000) +
  theme_minimal() + xlab("") + ylab("Cumul sur 12 mois") +
  theme(legend.position = c(0.2, 0.3),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  geom_label(data = . %>% filter(date == max(date)),
             aes(x = date, y = value/1000, label = paste0(round(value/1000, 1)), color = Int_acc_item)) +
  geom_hline(yintercept = 0, linetype = "dashed")

Différence

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.N.FR.W1.S1.S1.T.N.FA._T.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.M.S.FR.W1.S1.S1.T.B.CA._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  
  group_by(Accounting_entry) %>%
  arrange(date) %>%
  mutate(value = zoo::rollsum(x = value, 12, align = "right", fill = NA)) %>%
  ungroup %>%
  select(date, value, Int_acc_item) %>%
  na.omit %>%
  spread(Int_acc_item, value) %>%
  mutate(`Différence` = `Compte financier` - `Transactions courantes`) %>%
  gather(Int_acc_item, value, -date) %>%
   ggplot + geom_line(aes(x = date, y = value/1000, color = Int_acc_item)) +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  scale_y_continuous(labels = dollar_format(pre = ""),
                     breaks = seq(-300000, 300000, 10000)/1000) +
  theme_minimal() + xlab("") + ylab("") +
  theme(legend.position = c(0.2, 0.3),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  geom_label(data = . %>% filter(date == max(date)),
             aes(x = date, y = value/1000, label = round(value/1000, 1), color = Int_acc_item))

Investissement direct étranger

Flux

All

Monthly

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.N.FR.W1.S1.S1.T.A.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.M.N.FR.W1.S1.S1.T.L.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.M.N.FR.W1.S1.S1.T.N.FA.D.F._Z.EUR._T.V.N.ALL") %>%
  
  
  group_by(Accounting_entry) %>%
  arrange(date) %>%
  mutate(value = zoo::rollsum(x = value, 36, align = "right", fill = NA)/3) %>%
  na.omit %>%
   ggplot + geom_line(aes(x = date, y = value, color = Accounting_entry)) +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  scale_y_continuous(labels = dollar_format(pre = ""),
                     breaks = seq(-10000, 300000, 5000)) +
  theme_minimal() + xlab("") + ylab("") +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank(),
        legend.direction = "vertical")

Quarterly

Code
BPM6 %>%
  
  filter(variable == "BPM6.Q.N.FR.W1.S1.S1.T.A.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.Q.N.FR.W1.S1.S1.T.L.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.Q.N.FR.W1.S1.S1.T.N.FA.D.F._Z.EUR._T.V.N.ALL") %>%
  
  
  group_by(Accounting_entry) %>%
  arrange(date) %>%
  mutate(value = zoo::rollsum(x = value, 12, align = "right", fill = NA)/3) %>%
  na.omit %>%
   ggplot + geom_line(aes(x = date, y = value, color = Accounting_entry)) +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  scale_y_continuous(labels = dollar_format(pre = ""),
                     breaks = seq(-10000, 300000, 5000)) +
  theme_minimal() + xlab("") + ylab("") +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank(),
        legend.direction = "vertical")

Annual

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.A.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.A.N.FR.W1.S1.S1.T.L.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.A.N.FR.W1.S1.S1.T.N.FA.D.F._Z.EUR._T.V.N.ALL") %>%
  
  
  group_by(Accounting_entry) %>%
  arrange(date) %>%
  mutate(value = zoo::rollsum(x = value, 4, align = "right", fill = NA)/4) %>%
  na.omit %>%
   ggplot + geom_line(aes(x = date, y = value, color = Accounting_entry)) +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  scale_y_continuous(labels = dollar_format(pre = ""),
                     breaks = seq(-10000, 300000, 5000)) +
  theme_minimal() + xlab("") + ylab("") +
  theme(legend.position = c(0.2, 0.8),
        legend.title = element_blank(),
        legend.direction = "vertical")

2017

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.N.FR.W1.S1.S1.T.A.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.M.N.FR.W1.S1.S1.T.L.FA.D.F._Z.EUR._T.V.N.ALL" |
           variable == "BPM6.M.N.FR.W1.S1.S1.T.N.FA.D.F._Z.EUR._T.V.N.ALL",
            date >= as.Date("2017-01-01")) %>%
  
  
  arrange(desc(date)) %>%
   ggplot + geom_line(aes(x = date, y = value, color = Accounting_entry)) +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme_minimal() + xlab("") + ylab("") +
  theme(legend.position = c(0.2, 0.2),
        legend.title = element_blank(),
        legend.direction = "vertical")

Compte de transactions courantes

Biens, Services, Biens & Services

Annual

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.GS._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.CA._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value /gdp / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "2 years",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2, 0.2),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Biens, Services, Biens et Services (Net)") +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 1),
                labels = percent_format(accuracy = 1))

Quarterly

Code
BPM6 %>%
  
  filter(variable %in%c("BPM6.Q.N.FR.W1.S1.S1.T.B.GS._Z._Z._Z.EUR._T._X.N.ALL",
                        "BPM6.Q.N.FR.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL",
                        "BPM6.Q.N.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL",
                        "BPM6.Q.N.FR.W1.S1.S1.T.B.CA._Z._Z._Z.EUR._T._X.N.ALL")) %>%
  
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "2 years",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.2),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Balance") +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 1),
                labels = percent_format(accuracy = 1))

Monthly

Par mois

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.GS._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL" |
           variable == "BPM6.M.S.FR.W1.S1.S1.T.B.CA._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Par mois") +
  scale_y_continuous(breaks = seq(-200, 200, 2),
                labels = dollar_format(suffix = " Md€",  accuracy = 1, prefix = ""))

Cumul sur 12 mois

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.GS._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL" |
           variable == "BPM6.M.S.FR.W1.S1.S1.T.B.CA._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  group_by(Int_acc_item) %>%
  arrange(desc(date)) %>%
  mutate(value = zoo::rollsum(value, 12, align = "left", fill = NA)) %>%
  na.omit %>%
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.2),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Cumul sur 12 mois") +
  scale_y_continuous(breaks = seq(-200, 200, 10),
                labels = dollar_format(suffix = " Md€",  accuracy = 1, prefix = "")) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_label_repel(data = . %>% filter(date == max(date)),
             aes(x = date, y = value/1000, color = Int_acc_item, label = round(value/1000, digits = 1)))

Balance des services

BPM6.M.S.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL (Services) BPM6.M.S.FR.W1.S1.S1.T.B.SXD._Z._Z._Z.EUR._T._X.N.ALL (Services hors voyages) BPM6.M.S.FR.W1.S1.S1.T.B.SC._Z._Z._Z.EUR._T._X.N.ALL (Services - Transport) BPM6.M.N.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL (Services, Voyages)

Cumul sur 12 mois

Code
BPM6 %>%
  
  # Services
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL" |
           # Services hors voyages
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.SXD._Z._Z._Z.EUR._T._X.N.ALL" |
           # Services - Transport
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.SC._Z._Z._Z.EUR._T._X.N.ALL" |
           # Services, Voyages
         variable == "BPM6.M.N.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  group_by(Int_acc_item) %>%
  arrange(desc(date)) %>%
  mutate(value = zoo::rollsum(value, 12, align = "left", fill = NA)) %>%
  na.omit %>%
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Cumul sur 12 mois") +
  scale_y_continuous(breaks = seq(-200, 200, 10),
                labels = dollar_format(suffix = " Md€",  accuracy = 1, prefix = "")) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_label_repel(data = . %>% filter(date == max(date)),
             aes(x = date, y = value/1000, color = Int_acc_item, label = round(value/1000, digits = 1)))

Cumul sur 12 mois

Code
BPM6 %>%
  
  # Services
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL" |
           # Services hors voyages
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.SXD._Z._Z._Z.EUR._T._X.N.ALL" |
           # Services, Voyages
         variable == "BPM6.M.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  group_by(Int_acc_item) %>%
  arrange(desc(date)) %>%
  mutate(value = zoo::rollsum(value, 12, align = "left", fill = NA)) %>%
  na.omit %>%
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.8),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Cumul sur 12 mois") +
  scale_y_continuous(breaks = seq(-200, 200, 10),
                labels = dollar_format(suffix = " Md€",  accuracy = 1, prefix = "")) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_label_repel(data = . %>% filter(date == max(date)),
             aes(x = date, y = value/1000, color = Int_acc_item, label = round(value/1000, digits = 1)))

Balance des biens (Douanes vs. BPM6)

Cumul sur 12 mois

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.G1X._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.B.GX._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  group_by(Int_acc_item) %>%
  arrange(desc(date)) %>%
  mutate(value = zoo::rollsum(value, 12, align = "left", fill = NA)) %>%
  na.omit %>%
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.2),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Cumul sur 12 mois") +
  scale_y_continuous(breaks = seq(-200, 200, 10),
                labels = dollar_format(suffix = " Md€",  accuracy = 1, prefix = "")) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_label_repel(data = . %>% filter(date == max(date)),
             aes(x = date, y = value/1000, color = Int_acc_item, label = round(value/1000, digits = 1)))

Solde - Services, Transport, Voyage

Annual

Code
BPM6 %>%
  
  filter(variable %in% c("BPM6.A.N.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL",
                         "BPM6.A.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL",
                         "BPM6.A.N.FR.W1.S1.S1.T.B.SC._Z._Z._Z.EUR._T._X.N.ALL",
                         "BPM6.A.N.FR.W1.S1.S1.T.B.SXCD._Z._Z._Z.EUR._T._X.N.ALL")) %>%
  
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.85),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Balance des Services (% du PIB)") +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, .2),
                labels = percent_format(accuracy = .1),
                limits = 0.01*c(-0.6, 2.2)) +
  geom_hline(yintercept = 0, linetype = "dashed")

Quarterly

Code
BPM6 %>%
  
  filter(variable %in% c("BPM6.Q.N.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL",
                         "BPM6.Q.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL",
                         "BPM6.Q.N.FR.W1.S1.S1.T.B.SC._Z._Z._Z.EUR._T._X.N.ALL",
                         "BPM6.Q.N.FR.W1.S1.S1.T.B.SXCD._Z._Z._Z.EUR._T._X.N.ALL")) %>%
  
  left_join(gdp_quarterly, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value/gdp / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Services (Balance)") +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, .2),
                labels = percent_format(accuracy = .1)) +
  geom_hline(yintercept = 0, linetype = "dashed")

Biens

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.G._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.G._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.G._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  left_join(gdp, by = "date") %>%
  ggplot + geom_line(aes(x = date, y = value / gdp / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Biens") +
  scale_y_continuous(breaks = 0.01*seq(-200, 200, 2),
                labels = percent_format(accuracy = 1))

Services

Annual

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.S._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.S._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.S._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Services de Voyage") +
  scale_y_continuous(breaks = seq(-200, 2000, 20),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Quarterly

Code
BPM6 %>%
  
  filter(variable == "BPM6.Q.N.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Monthly

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Services de Transport

Annual

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.SC._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.SC._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.SC._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Services de Voyage") +
  scale_y_continuous(breaks = seq(-200, 200, 5),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Quarterly

Code
BPM6 %>%
  
  filter(variable == "BPM6.Q.N.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Monthly

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Services de Voyage

Annual

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Services de Voyage") +
  scale_y_continuous(breaks = seq(-200, 200, 5),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Quarterly

Code
BPM6 %>%
  
  filter(variable == "BPM6.Q.N.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Monthly

Code
BPM6 %>%
  
  filter(variable == "BPM6.M.S.FR.W1.S1.S1.T.B.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.C.SD._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.M.S.FR.W1.S1.S1.T.D.SD._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 1),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Investissements de portefeuille

Quarterly

Code
BPM6 %>%
  
  filter(variable == "BPM6.Q.N.FR.W1.S1.S1.T.A.FA.P.F._Z.EUR._T.M.N.ALL" |
         variable == "BPM6.Q.N.FR.W1.S1.S1.T.N.FA.P.F._Z.EUR._T.M.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Variable)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-200, 200, 20),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Revenus Primaires

Tous

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.IN1._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.IN1._Z._Z._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.IN1._Z._Z._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "2 years",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("Revenus Primaires") +
  scale_y_continuous(breaks = seq(-200, 1000, 20),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Portefeuille

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.D4P.P.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P.P.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.D4P.P.F._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Revenus de portefeuille") +
  scale_y_continuous(breaks = seq(-200, 1000, 20),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Revenus des autres investissements

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.C.D4P.O.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.D4P.O.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P.O.F._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Revenus de portefeuille") +
  scale_y_continuous(breaks = seq(-200, 1000, 10),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Revenus d’investissement

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P._T.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.C.D4P._T.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.D4P._T.F._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Revenus d'investissement") +
  scale_y_continuous(breaks = seq(-200, 1000, 20),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Revenus des investissements directs

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P.D.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.C.D4P.D.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.D.D4P.D.F._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2,0.9),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  xlab("") + ylab("Revenus des investissements directs") +
  scale_y_continuous(breaks = seq(-200, 1000, 10),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Balance

Code
BPM6 %>%
  
  filter(variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P.D.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P._T.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P.O.F._Z.EUR._T._X.N.ALL" |
         variable == "BPM6.A.N.FR.W1.S1.S1.T.B.D4P.P.F._Z.EUR._T._X.N.ALL") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Functional_cat)) +
  
  theme_minimal() + xlab("") + ylab("Revenus primaires") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.25, 0.85),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  scale_y_continuous(breaks = seq(-200, 1000, 10),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Balance

Code
BPM6 %>%
  
  filter(grepl("BPM6.A.N.FR.W1.S1.S1.T.B.D4P.", variable)) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Functional_cat)) +
  
  theme_minimal() + xlab("") + ylab("Revenus primaires") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.25, 0.85),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  scale_y_continuous(breaks = seq(-200, 1000, 10),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Revenus Secondaires

Tous

Code
BPM6 %>%
  
  filter(grepl("BPM6.A.N.FR.W1.S1.S1.T.B.IN2.", variable) |
         grepl("BPM6.A.N.FR.W1.S1.S1.T.C.IN2.", variable) |
         grepl("BPM6.A.N.FR.W1.S1.S1.T.D.IN2.", variable)) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Accounting_entry)) +
  
  theme_minimal() + xlab("") + ylab("Revenus secondaires") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.25, 0.85),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  scale_y_continuous(breaks = seq(-200, 1000, 10),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Balance

Code
BPM6 %>%
  
  filter(grepl("BPM6.A.N.FR.W1.S1.S1.T.B.IN2.", variable)) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Functional_cat)) +
  
  theme_minimal() + xlab("") + ylab("Revenus secondaires") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.25, 0.85),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  scale_y_continuous(breaks = seq(-200, 1000, 2),
                labels = dollar_format(suffix = " Mds €",  accuracy = 1, prefix = ""))

Transactions Courantes

All

Code
BPM6 %>%
  
  filter(FREQ == "M",
         INT_ACC_ITEM %in% c("G", "S", "G1X"),
         ADJUSTMENT == "S",
         REF_SECTOR == "S1",
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-100, 10, 1),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

2018-

Code
BPM6 %>%
  
  filter(date >= as.Date("2018-01-01"),
         FREQ == "M",
         ADJUSTMENT == "S",
         COUNTERPART_AREA == "W1",
         REF_SECTOR == "S1",
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("G", "S")) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "3 months",
               labels = date_format("%b-%y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical",
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  scale_y_continuous(breaks = seq(-100, 10, 1),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Table - Monthly

Code
BPM6 %>%
  
  filter(date == as.Date("2018-01-01"),
         FREQ == "M",
         ADJUSTMENT == "S",
         REF_SECTOR == "S1",
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B") %>%
  
  
  select(Int_acc_item, Functional_cat, value) %>%
  print_table_conditional
Int_acc_item Functional_cat value
NA NA NA
:------------: :--------------: :-----:

France vis à vis de l’Allemagne

All

Code
BPM6 %>%
  
  filter(FREQ == "A",
         COUNTERPART_AREA == "DE",
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("G", "S")) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +  xlab("") + ylab("") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  scale_y_continuous(breaks = seq(-40, 10, 1),
                labels = dollar_format(suffix = " Bn €",  accuracy = 1, prefix = ""))

Biens

Code
load_data("bdf/COUNTERPART_AREA.RData")
BPM6 %>%
  
  filter(FREQ == "A",
         COUNTERPART_AREA %in% c("DE", "CN"),
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("G")) %>%
  
  left_join(colors, by = c("Counterpart_area" = "country")) %>%
  mutate(value = value / 1000) %>%
  mutate(Ref_area = Counterpart_area) %>%
  ggplot + geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_2flags +
  theme_minimal() +  xlab("") + ylab("") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  scale_y_continuous(breaks = seq(-100, 10, 5),
                labels = dollar_format(suffix = "Mds€",  accuracy = 1, prefix = ""))

Services

Code
load_data("bdf/COUNTERPART_AREA.RData")
BPM6 %>%
  
  filter(FREQ == "A",
         COUNTERPART_AREA %in% c("DE", "CN"),
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("S")) %>%
  
  left_join(colors, by = c("Counterpart_area" = "country")) %>%
  mutate(value = value / 1000) %>%
  mutate(Ref_area = Counterpart_area) %>%
  ggplot + geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_2flags +
  theme_minimal() +  xlab("") + ylab("") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  scale_y_continuous(breaks = seq(-40, 10, 1),
                labels = dollar_format(suffix = "Mds€",  accuracy = 1, prefix = ""))

Biens et Services

Code
load_data("bdf/COUNTERPART_AREA.RData")
BPM6 %>%
  
  filter(FREQ == "A",
         COUNTERPART_AREA %in% c("DE", "CN"),
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("S", "G")) %>%
  select_if(~ n_distinct(.) > 1) %>%
  group_by(date, COUNTERPART_AREA) %>%
  summarise(value = sum(value)) %>%
  left_join(COUNTERPART_AREA, by = "COUNTERPART_AREA") %>%
  left_join(colors, by = c("Counterpart_area" = "country")) %>%
  mutate(value = value / 1000) %>%
  mutate(Ref_area = Counterpart_area) %>%
  ggplot + geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_2flags +
  theme_minimal() +  xlab("") + ylab("Déficit Bilatéral avec la France (Source: Banque de France)") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  scale_y_continuous(breaks = seq(-40, 10, 2),
                labels = dollar_format(suffix = "Mds€",  accuracy = 1, prefix = ""))

France vis à vis de la Chine

All

Quarterly

Code
BPM6 %>%
  
  filter(FREQ == "A",
         COUNTERPART_AREA == "CN",
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("G", "S")) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3,0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-100, 10, 5),
                labels = dollar_format(suffix = " Mds€",  accuracy = 1, prefix = ""))

Quarterly

Code
BPM6 %>%
  
  filter(FREQ == "A",
         INT_ACC_ITEM %in% c("G", "S", "G1X"),
         COUNTERPART_AREA == "CN",
         REF_SECTOR == "S1",
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B",
         INT_ACC_ITEM %in% c("G", "S")) %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Int_acc_item)) +
  
  theme_minimal() +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.3, 0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  xlab("") + ylab("") +
  scale_y_continuous(breaks = seq(-50, 10, 5),
                labels = dollar_format(suffix = " Mds€",  accuracy = 1, prefix = ""))

Table

Code
BPM6 %>%
  
  filter(date == as.Date("2020-03-31"),
         FREQ == "Q",
         INT_ACC_ITEM %in% c("G"),
         REF_SECTOR == "S1",
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B") %>%
  select(COUNTERPART_AREA, Variable, value) %>%
  print_table_conditional
COUNTERPART_AREA Variable value
B6 Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis de l'Union européenne (27 membres) - Trimestriel - Brut -7510
CH Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis Suisse - Brut 798
J9 Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis hors Zone Euro - Brut -6778
JP Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis Japon - Brut -938
W1 Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis Reste du monde - Brut -13919
I9 Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis Zone Euro - Brut -7142
CN Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis Chine - Brut -8069
Q6 Transactions courantes - Biens - Ensemble de l'économie - Solde -France vis-à-vis de l'Union européenne à 28, hors zone euro à 18, à l?exclusion du Royaume-Uni, du Danemark et de la Suède - Brut -416
US Transactions courantes - Biens - Ensemble de l'économie - Solde - France vis-à-vis États Unis - Brut 651

Goods

Code
BPM6 %>%
  
  filter(date >= as.Date("2016-12-31"),
         FREQ == "Q",
         INT_ACC_ITEM %in% c("G"),
         REF_SECTOR == "S1",
         COUNTERPART_AREA %in% c("W1", "I8", "J8"),
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Counterpart_area)) +
  
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.6, 0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  scale_y_continuous(breaks = seq(-30, 30, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

2010

Code
BPM6 %>%
  
  filter(date >= as.Date("2010-12-31"),
         FREQ == "Q",
         INT_ACC_ITEM %in% c("G"),
         REF_SECTOR == "S1",
         COUNTERPART_AREA %in% c("W1", "I8", "J8"),
         COUNTERPART_SECTOR == "S1",
         FLOW_STOCK_ENTRY == "T",
         ACCOUNTING_ENTRY == "B") %>%
  
  ggplot + geom_line(aes(x = date, y = value / 1000, color = Counterpart_area)) +
  
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "1 year",
               labels = date_format("%Y")) +
  theme(legend.position = c(0.6, 0.1),
        legend.title = element_blank(),
        legend.direction = "vertical") +
  scale_y_continuous(breaks = seq(-30, 30, 2),
                labels = dollar_format(suffix = " Tn €",  accuracy = 1, prefix = ""))

Dette Exterieure Nette

Code
BPM6 %>%
  
  filter(variable %in% c("BPM6.A.N.FR.W1.S1.S1.LE.N.FA._T.FNED._Z.PCPIB._T._X.N.ALL",
                         "BPM6.A.N.FR.W1.S1.S1.LE.N.FA._T.F._Z.PCPIB._T._X.N.ALL")) %>%
  ggplot + geom_line(aes(x = date, y = value/100, color = Variable)) + 
  xlab("") + ylab("") + theme_minimal() +
 
  scale_x_date(breaks = "2 years",
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-200, 140, 10),
                labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.3, 0.9),
        legend.title = element_blank(),
        legend.direction = "vertical")