Central government debt, total (% of GDP)

Data - WDI

Info

Last observation: 2024 (N = 1,798)

First observation: 1970 (N = 1,798)

Last data update: 14 aoû 2026, 20:00. Last compile: 14 aoû 2026, 20:36

Info

LAST_DOWNLOAD

Code
`public-debt` |>
  arrange(-(dataset == "GC.DOD.TOTL.GD.ZS")) %>%
  mutate(Title = read_lines(paste0("~/iCloud/website/data/", source, "/",dataset, ".qmd"), skip = 1, n_max = 1) %>% gsub("title: ", "", .) %>% gsub("\"", "", .)) |>
  mutate(Download = as.Date(file.info(paste0("~/iCloud/website/data/", source, "/", dataset, ".RData"))$mtime),
         Compile = as.Date(file.info(paste0("~/iCloud/website/data/", source, "/", dataset, ".html"))$mtime)) |>
  mutate(Compile = paste0("[", Compile, "](https://fgeerolf.com/data/", source, "/", dataset, '.html)')) |>
  print_table_conditional_20()
source dataset Title Download Compile
wdi GC.DOD.TOTL.GD.ZS Central government debt, total (% of GDP) NA [2026-08-13]
eurostat ei_mfir_m Interest rates - monthly data NA [2026-08-14]
eurostat gov_10q_ggdebt Quarterly government debt NA [2026-08-14]
fred r Interest Rates NA [2026-08-14]
fred saving Saving - saving NA [2026-08-14]
gfd debt Debt NA [2021-08-22]
imf FM Fiscal Monitor (FM) 2020-03-13 [2026-07-25]
imf GGXCNL_G01_GDP_PT Net lending/borrowing (also referred as overall balance) (% of GDP) NA [2026-08-13]
imf GGXONLB_G01_GDP_PT Primary net lending/borrowing (also referred as primary balance) (% of GDP) NA [2026-08-13]
imf GGXWDN_G01_GDP_PT Net debt (% of GDP) NA [2026-08-13]
imf HPDD Historical Public Debt Database NA [2026-08-13]
oecd QASA_TABLE7PSD Quarterly Sector Accounts - Public Sector Debt, consolidated, nominal value NA [2026-08-14]
wdi GC.XPN.INTP.CN Interest payments (current LCU) NA [2026-08-13]
wdi GC.XPN.INTP.RV.ZS Interest payments (% of revenue) NA [2026-08-13]
wdi GC.XPN.INTP.ZS Interest payments (% of expense) NA [2026-08-13]

LAST_COMPILE

LAST_COMPILE
2026-08-14

Last

Code
GC.DOD.TOTL.GD.ZS |>
  group_by(year) |>
  summarise(Nobs = n()) |>
  filter(year == max(year)) |>
  print_table_conditional()
year Nobs
2024 36

Nobs - Javascript

Code
GC.DOD.TOTL.GD.ZS |>
  left_join(iso2c, by = "iso2c") |>
  group_by(iso2c, Iso2c) |>
  mutate(value = round(value, 2)) |>
  summarise(Nobs = n(),
            `Year 1` = first(year),
            `HH Consumption 1 (%)` = first(value),
            `Year 2` = last(year),
            `HH Consumption 2 (%)` = last(value)) |>
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Japan, Switzerland

Code
GC.DOD.TOTL.GD.ZS |>
  filter(iso2c %in% c("JP", "CH")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_date() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + theme_minimal() + add_flags +
  geom_line(aes(x = date, y = value, color = color)) + 
  xlab("") + ylab("Central government debt, total (% of GDP)") +
  scale_color_identity() +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 400, 20),
                     labels = scales::percent_format(accuracy = 1))

China, United States

Code
GC.DOD.TOTL.GD.ZS |>
  filter(iso2c %in% c("EU", "US", "FR", "IT")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_date() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + theme_minimal() + add_flags +
  geom_line(aes(x = date, y = value, color = color)) + 
  xlab("") + ylab("Central government debt, total (% of GDP)") +
  scale_color_identity() +
  theme(legend.title = element_blank(),
        legend.position = c(0.2, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 400, 20),
                     labels = scales::percent_format(accuracy = 1))

China, France, Germany

Code
GC.DOD.TOTL.GD.ZS |>
  filter(iso2c %in% c("CN", "FR", "DE")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_date() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + theme_minimal() + add_flags +
  geom_line(aes(x = date, y = value, color = color)) + 
  xlab("") + ylab("Central government debt, total (% of GDP)") +
  scale_color_identity() +
  theme(legend.title = element_blank(),
        legend.position = c(0.15, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 400, 10),
                     labels = scales::percent_format(accuracy = 1))

Spain, United Kingdom, United States

Code
GC.DOD.TOTL.GD.ZS |>
  filter(iso2c %in% c("US", "GB", "ES")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_date() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + theme_minimal() + add_flags +
  geom_line(aes(x = date, y = value, color = color)) + 
  xlab("") + ylab("Central government debt, total (% of GDP)") +
  scale_color_identity() +
  theme(legend.title = element_blank(),
        legend.position = c(0.4, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 400, 20),
                     labels = scales::percent_format(accuracy = 1))

Greece, Hong Kong, Mexico

Code
GC.DOD.TOTL.GD.ZS |>
  filter(iso2c %in% c("GR", "HK", "MX")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_date() |>
  mutate(value = value/100) |>
  mutate(Iso2c = ifelse(iso2c == "HK", "Hong Kong", Iso2c)) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + theme_minimal() + geom_line() + add_flags +
  aes(x = date, y = value, color = color) +
  xlab("") + ylab("Central government debt, total (% of GDP)") +
  scale_color_identity() +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.9)) +
  scale_x_date(breaks = seq(1950, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 2000, 10),
                     labels = scales::percent_format(accuracy = 1))