Quarterly non-financial accounts for general government

Data - Eurostat

Info

LAST_DOWNLOAD

Code
tibble(DOWNLOAD_TIME = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/gov_10q_ggnfa.RData")$mtime)) %>%
  print_table_conditional()
DOWNLOAD_TIME
2024-10-09

LAST_COMPILE

LAST_COMPILE
2024-11-05

Last

Code
gov_10q_ggnfa %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2024Q1 14757

unit

Code
gov_10q_ggnfa %>%
  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 471168
MIO_EUR Million euro 471073
PC_GDP Percentage of gross domestic product (GDP) 467193

sector

Code
gov_10q_ggnfa %>%
  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 616911
S1312 State government 216129
S1314 Social security funds 191863
S1313 Local government 189612
S1311 Central government 189600
S212 Institutions of the EU 5319

sector

Code
gov_10q_ggnfa %>%
  left_join(s_adj, by = "s_adj") %>%
  group_by(s_adj, S_adj) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
s_adj S_adj Nobs
NSA Unadjusted data (i.e. neither seasonally adjusted nor calendar adjusted data) 1219210
SCA Seasonally and calendar adjusted data 163339
SA Seasonally adjusted data, not calendar adjusted data 22257
TC Trend cycle data 4628

na_item

All

Code
gov_10q_ggnfa %>%
  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_ggnfa %>%
  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_ggnfa %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  print_table_conditional()

EA-19, Deficit

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

Deficit

All

Code
gov_10q_ggnfa %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "B9",
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         s_adj == "NSA") %>%
  left_join(geo, by = "geo") %>%
  quarter_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"))

2000-

Code
gov_10q_ggnfa %>%
  filter(sector == "S13",
         unit == "PC_GDP",
         na_item == "B9",
         geo %in% c("FR", "DE", "IT", "ES", "NL"),
         s_adj == "NSA") %>%
  left_join(geo, by = "geo") %>%
  quarter_to_date() %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values / 100) %>%
  filter(date >= as.Date("2000-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, 2), "-01-01")),
               labels = date_format("%Y"))