Quarterly government debt

Data - Eurostat

Info

source dataset .html .RData
eurostat gov_10dd_edpt1 2024-11-22 2024-11-22

LAST_DOWNLOAD

source dataset .html .RData
eurostat ei_mfir_m 2024-11-23 2024-11-22
eurostat gov_10q_ggdebt 2024-11-22 2024-11-22
fred r 2024-11-22 2024-11-22
fred saving 2024-11-22 2024-11-22
gfd debt 2021-08-22 2021-03-01
imf FM 2024-06-20 2020-03-13
imf GGXCNL_G01_GDP_PT 2024-11-22 2024-11-22
imf GGXONLB_G01_GDP_PT 2024-11-22 2024-11-22
imf GGXWDN_G01_GDP_PT 2024-10-29 2024-05-06
imf HPDD 2024-06-20 NA
oecd QASA_TABLE7PSD 2024-09-15 2024-11-22
wdi GC.DOD.TOTL.GD.ZS 2023-06-18 2024-09-18
wdi GC.XPN.INTP.CN 2023-06-18 2024-09-18
wdi GC.XPN.INTP.RV.ZS 2023-06-18 2024-09-18
wdi GC.XPN.INTP.ZS 2024-09-18 2024-09-18

LAST_COMPILE

LAST_COMPILE
2024-11-23

Last

Code
gov_10dd_edpt1 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2023 2103

unit

Code
gov_10dd_edpt1 %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
MIO_EUR Million euro 16514
MIO_NAC Million units of national currency 16514
PC_GDP Percentage of gross domestic product (GDP) 16514

sector

Code
gov_10dd_edpt1 %>%
  left_join(sector, by = "sector") %>%
  group_by(sector, Sector) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
sector Sector Nobs
S13 General government 33297
S1 Total economy 3906
S1311 Central government 3879
S1313 Local government 3858
S1314 Social security funds 3759
S1312 State government 843

na_item

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

geo

Code
gov_10dd_edpt1 %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  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 .}

time

Code
gov_10dd_edpt1 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  print_table_conditional()
time Nobs
2023 2103
2022 2103
2021 2103
2020 2103
2019 1836
2018 1839
2017 1836
2016 1836
2015 1836
2014 1836
2013 1836
2012 1833
2011 1833
2010 1833
2009 1830
2008 1557
2007 1557
2006 1554
2005 1554
2004 1554
2003 1548
2002 1548
2001 1539
2000 1536
1999 1413
1998 1413
1997 1413
1996 1380
1995 1380

EA-19

Debt

Code
gov_10dd_edpt1 %>%
  filter(time %in% c("2022", "2021"),
         sector == "S13",
         unit == "PC_GDP",
         na_item == "GD") %>%
  select(geo, time, values) %>%
  spread(time, values) %>%
  left_join(geo, by = "geo") %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, Geo, geo, everything()) %>%
  arrange(-`2022`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Deficit

Code
gov_10dd_edpt1 %>%
  filter(time %in% c("2022", "2021"),
         sector == "S13",
         unit == "PC_GDP",
         na_item == "B9") %>%
  select(geo, time, values) %>%
  spread(time, values) %>%
  left_join(geo, by = "geo") %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, Geo, geo, everything()) %>%
  arrange(-`2022`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Last

Debt

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "GD") %>%
  group_by(geo) %>%
  filter(time == max(time)) %>%
  left_join(geo, by = "geo") %>%
  select_if(~ n_distinct(.) > 1) %>%
  arrange(values) %>%
  select(geo, Geo, everything()) %>%
  print_table_conditional()
geo Geo values
EE Estonia 20.2
BG Bulgaria 22.9
LU Luxembourg 25.5
SE Sweden 31.5
DK Denmark 33.6
LT Lithuania 37.3
CZ Czechia 42.4
IE Ireland 43.3
LV Latvia 45.0
NL Netherlands 45.1
MT Malta 47.4
RO Romania 48.9
PL Poland 49.7
SK Slovakia 56.1
HR Croatia 61.8
DE Germany 62.9
SI Slovenia 68.4
HU Hungary 73.4
CY Cyprus 73.6
FI Finland 77.1
AT Austria 78.6
EU27_2020 European Union - 27 countries (from 2020) 80.8
EA20 Euro area – 20 countries (from 2023) 87.4
EA19 Euro area - 19 countries (2015-2022) 87.5
PT Portugal 97.9
BE Belgium 103.1
ES Spain 105.1
FR France 109.9
IT Italy 134.8
EL Greece 163.9

Luxembourg, Denmark, Sweden, Netherlands, Germany, France

Debt

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "GD",
         geo %in% c("NL", "LU", "DK", "SE", "FR")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Public debt (years of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_5flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
                     labels = scales::dollar_format(acc = .1, pre = "", su = " y")) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 5), "-01-01")),
               labels = date_format("%Y"))

Deficit

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "B9",
         geo %in% c("NL", "LU", "DK", "SE", "FR")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Deficit") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_5flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, 1),
                     labels = scales::percent_format(acc = 1)) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 5), "-01-01")),
               labels = date_format("%Y"))

France, Germany, Italy, Spain, Netherlands

Debt

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "GD",
         geo %in% c("FR", "DE", "IT", "ES", "NL")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Public debt (years of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_5flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
                     labels = scales::dollar_format(acc = .1, pre = "", su = " y")) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 5), "-01-01")),
               labels = date_format("%Y"))

Deficit

All

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "B9",
         geo %in% c("FR", "DE", "IT", "ES", "NL")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Deficit") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_5flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, 1),
                     labels = scales::percent_format(acc = 1)) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 2), "-01-01")),
               labels = date_format("%Y"))

2010-

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "B9",
         geo %in% c("FR", "DE", "IT", "ES", "NL")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  filter(date >= as.Date("2010-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Deficit") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_5flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-100, 260, 1),
                     labels = scales::percent_format(acc = 1)) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 1), "-01-01")),
               labels = date_format("%Y"))

Interest payments

All

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "D41PAY",
         geo %in% c("FR", "DE", "IT", "ES", "NL", "EA19")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100,
         Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Deficit") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_6flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, 1),
                     labels = scales::percent_format(acc = 1)) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 5), "-01-01")),
               labels = date_format("%Y"))

2005-

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "D41PAY",
         geo %in% c("FR", "DE", "IT", "ES", "NL", "EA19")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  mutate(values = values / 100,
         Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("2005-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Interest payments (% of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_6flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, 1),
                     labels = scales::percent_format(acc = 1)) +
  scale_x_date(breaks = as.Date(paste0(seq(2005, 2100, 2), "-01-01")),
               labels = date_format("%Y"))

France, Europe

2005-

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "D41PAY",
         geo %in% c("FR", "EA19")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  mutate(values = values / 100,
         Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("2005-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Interest payments (% of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_2flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, .1),
                     labels = scales::percent_format(acc = .1)) +
  scale_x_date(breaks = as.Date(paste0(seq(2005, 2100, 2), "-01-01")),
               labels = date_format("%Y"))

France, Portugal, Greece, EUrope

2005-

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "D41PAY",
         geo %in% c("FR", "EA19", "EL", "PT")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  mutate(values = values / 100,
         Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("2005-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Interest payments (% of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_4flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, .5),
                     labels = scales::percent_format(acc = .1)) +
  scale_x_date(breaks = as.Date(paste0(seq(2005, 2100, 2), "-01-01")),
               labels = date_format("%Y"))

Italy, Portugal, Spain, Greece, Belgium, France

All

Debt

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "GD",
         geo %in% c("IT", "PT", "ES", "EL", "BE", "FR")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Public debt (years of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_6flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
                     labels = scales::dollar_format(acc = .1, pre = "", su = " y")) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 5), "-01-01")),
               labels = date_format("%Y"))

Deficit

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "B9",
         geo %in% c("IT", "PT", "ES", "EL", "BE", "FR")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Deficit") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_6flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 260, 1),
                     labels = scales::percent_format(acc = 1)) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2100, 5), "-01-01")),
               labels = date_format("%Y"))

Debt

Years of GDP

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "GD",
         geo %in% c("IT", "PT", "ES", "EL", "BE", "FR", "EA19")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  mutate(values = values / 100,
         Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("2015-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Public debt (years of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_7flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
                     labels = scales::dollar_format(acc = .1, pre = "", su = " y")) +
  scale_x_date(breaks = as.Date(paste0(seq(2015, 2100, 1), "-01-01")),
               labels = date_format("%Y"))

% of GDP…

Code
gov_10dd_edpt1 %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "GD",
         geo %in% c("IT", "PT", "ES", "EL", "BE", "FR", "EA19")) %>%
  left_join(geo, by = "geo") %>%
  year_to_date() %>%
  mutate(values = values / 100,
         Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  filter(date >= as.Date("2015-01-01")) %>%
  ggplot(.) + theme_minimal() + xlab("") + ylab("Public debt (% of GDP)") +
  geom_line(aes(x = date, y = values, color = color)) +
  scale_color_identity() + add_7flags +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
                     labels = scales::percent_format()) +
  scale_x_date(breaks = as.Date(paste0(seq(2015, 2100, 1), "-01-01")),
               labels = date_format("%Y"))