Total debt service (% of GNI) - DT.TDS.DECT.GN.ZS

Data - WDI

Last observation: 2024 (N = 150)

First observation: 1970 (N = 85)

Last data update: 04 sept. 2026, 00:24

Last compile: 04 sept. 2026, 00:30

Nobs - Javascript

Code
DT.TDS.DECT.GN.ZS |>
  left_join(iso2c, by = "iso2c") |>
  group_by(iso2c, Iso2c) |>
  mutate(value = round(value, 2)) |>
  summarise(Nobs = n(),
            `Year 1` = first(year),
            `Rent 1 (%)` = first(value),
            `Year 2` = last(year),
            `Rent 2 (%)` = last(value)) |>
  arrange(-`Rent 2 (%)`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

China, France, Germany

Code
DT.TDS.DECT.GN.ZS |>
  filter(iso2c %in% c("CN", "FR", "DE")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_enddate() |>
  mutate(value = value/100) |>
  add_flag_color("Iso2c") |>
  ggplot() + 
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_flags +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.8)) +
  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, 60, 2),
                     labels = scales::percent_format(accuracy = 1)) +
  xlab("") + ylab("Total debt service (% of GNI)")