Last observation: 2024 (N = 36)
First observation: 1970 (N = 1)
Last data update: 23 sept. 2026, 23:03
Last compile: 23 sept. 2026, 23:11
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 .}GC.DOD.TOTL.GD.ZS |>
filter(iso2c %in% c("JP", "CH")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
mutate(value = value/100) |>
add_flag_color("Iso2c") |>
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))
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) |>
add_flag_color("Iso2c") |>
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))
GC.DOD.TOTL.GD.ZS |>
filter(iso2c %in% c("CN", "FR", "DE")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
mutate(value = value/100) |>
add_flag_color("Iso2c") |>
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))
GC.DOD.TOTL.GD.ZS |>
filter(iso2c %in% c("US", "GB", "ES")) |>
left_join(iso2c, by = "iso2c") |>
year_to_date() |>
mutate(value = value/100) |>
add_flag_color("Iso2c") |>
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))
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)) |>
add_flag_color("Iso2c") |>
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))