source | dataset | .html | .RData |
---|---|---|---|
eurostat | gov_10q_ggdebt | 2024-12-22 | 2024-12-22 |
Quarterly government debt
Data - Eurostat
Info
Data on public debt
source | dataset | .html | .RData |
---|---|---|---|
eurostat | ei_mfir_m | 2024-12-22 | 2024-12-22 |
eurostat | gov_10q_ggdebt | 2024-12-22 | 2024-12-22 |
fred | r | 2024-12-22 | 2024-12-22 |
fred | saving | 2024-12-22 | 2024-12-22 |
gfd | debt | 2021-08-22 | 2021-03-01 |
imf | FM | 2024-06-20 | 2020-03-13 |
imf | GGXCNL_G01_GDP_PT | 2024-12-16 | 2024-12-16 |
imf | GGXONLB_G01_GDP_PT | 2024-12-16 | 2024-12-16 |
imf | GGXWDN_G01_GDP_PT | 2024-10-29 | 2024-05-06 |
imf | HPDD | 2024-06-20 | NA |
oecd | QASA_TABLE7PSD | 2024-09-15 | 2024-12-16 |
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-12-22 |
Last
Code
%>%
gov_10q_ggdebt group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()
time | Nobs |
---|---|
2024Q2 | 7227 |
unit
Code
%>%
gov_10q_ggdebt 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_NAC | Million units of national currency | 187059 |
MIO_EUR | Million euro | 186133 |
PC_GDP | Percentage of gross domestic product (GDP) | 184671 |
PC_TOT | Percentage of total | 156850 |
sector
Code
%>%
gov_10q_ggdebt 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 | 151843 |
S1312 | State government | 148542 |
S1314 | Social security funds | 137778 |
S1313 | Local government | 134212 |
S1311 | Central government | 134116 |
S13111 | Budgetary central government | 3921 |
S13112 | Central government other than budgetary central government | 3375 |
S11001 | Public non-financial corporations | 926 |
na_item
Code
%>%
gov_10q_ggdebt 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_10q_ggdebt 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_10q_ggdebt group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
print_table_conditional()
EA-19, Deficit
Code
%>%
gov_10q_ggdebt filter(time %in% c("2022Q3", "2015Q1"),
== "S13",
sector == "PC_GDP",
unit == "GD") %>%
na_item 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(-`2022Q3`) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .} {
Last
Debt
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD") %>%
na_item 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()
Italy, Portugal, Greece, France, Europe
Gross Debt
2005-
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "EL", "FR", "EA19")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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("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(1990, 2025, 2), "-01-01")),
labels = date_format("%Y"))
Luxembourg, Denmark, Sweden, Netherlands, Germany, France
All
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("NL", "LU", "DK", "SE", "FR")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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, 2050, 2), "-01-01")),
labels = date_format("%Y"))
France, Germany
All
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("FR", "DE")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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_2flags +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(0, 260, 10),
labels = scales::dollar_format(acc = .1, pre = "", su = " y")) +
scale_x_date(breaks = as.Date(paste0(seq(1700, 2050, 2), "-01-01")),
labels = date_format("%Y"))
France, Germany, Italy, Spain, Netherlands
All
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("FR", "DE", "IT", "ES", "NL")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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, 2050, 2), "-01-01")),
labels = date_format("%Y"))
Italy, Portugal, Spain, Greece, Belgium, France
All
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "ES", "EL", "BE", "FR")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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, 2050, 2), "-01-01")),
labels = date_format("%Y"))
2005
Years of GDP
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "ES", "EL", "BE", "FR", "EA19")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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("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(1990, 2025, 2), "-01-01")),
labels = date_format("%Y"))
2015
Years of GDP
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "NL", "ES", "FR", "EA19")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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_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(2015, 2025, 1), "-01-01")),
labels = date_format("%Y"))
% of GDP…
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "ES", "EL", "BE", "FR", "EA19")) %>%
geo left_join(geo, by = "geo") %>%
quarter_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, 2025, 1), "-01-01")),
labels = date_format("%Y"))
2019
Years of GDP
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "NL", "ES", "FR", "EA19")) %>%
geo left_join(geo, by = "geo") %>%
quarter_to_date() %>%
mutate(values = values / 100,
Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
left_join(colors, by = c("Geo" = "country")) %>%
filter(date >= as.Date("2019-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_6flags +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
labels = scales::dollar_format(acc = .1, pre = "", su = " y")) +
scale_x_date(breaks = "3 months",
labels = date_format("%b %Y"))
% of GDP…
Code
%>%
gov_10q_ggdebt filter(sector == "S13",
== "PC_GDP",
unit == "GD",
na_item %in% c("IT", "PT", "ES", "EL", "FR", "EA19")) %>%
geo left_join(geo, by = "geo") %>%
quarter_to_date() %>%
mutate(values = values / 100,
Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
left_join(colors, by = c("Geo" = "country")) %>%
filter(date >= as.Date("2019-01-01")) %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Public debt (% 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(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(0, 260, 20),
labels = scales::percent_format()) +
scale_x_date(breaks = "3 months",
labels = date_format("%b %Y"))