Investment share of GDP by institutional sectors - sdg_08_11

Data - Eurostat

indic

Code
sdg_08_11 %>%
  left_join(indic, by = "indic") %>%
  group_by(indic, Indic) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
indic Indic Nobs
INV_TOT Total investment 810
INV_BSN Business investment 775
INV_HH Households investment 775
INV_GOV Government investment 773

unit

Code
sdg_08_11 %>%
  left_join(unit, by = "unit") %>%
  group_by(unit, Unit) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
unit Unit Nobs
PC Percentage 3133

geo

Code
sdg_08_11 %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

time

Code
sdg_08_11 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Average 2010-2019

Javascript

Code
sdg_08_11 %>%
  mutate(time = as.numeric(time)) %>%
  filter(time >= 2010) %>%
  group_by(geo, indic) %>%
  summarise(values = mean(values, na.rm = T)) %>%
  ungroup %>%
  left_join(indic, by = "indic") %>%
  left_join(geo, by = "geo") %>%
  mutate(Indic = gsub(" investment", "", Indic)) %>%
  select(Indic, `Investment 2010-19 (% of GDP)` = Geo, values) %>%
  spread(Indic, values) %>%
  arrange(-Government) %>%
  mutate_at(vars(-1), funs(percent(./100, accuracy = 0.1))) %>%
  select(1, 5, 2, 3, 4) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

png

Code
include_graphics3("bib/eurostat/sdg_08_11_ex1.png")