National consumer price index (CPI) by COICOP, country weights - CPI_NWGT_COI_DT_A

Data - ILO

ref_area

Code
CPI_NWGT_COI_DT_A %>%
  left_join(ref_area, by = "ref_area") %>%
  group_by(ref_area, Ref_area) %>%
  summarise(Nobs = n()) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Ref_area)),
         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 .}

indicator

Code
CPI_NWGT_COI_DT_A %>%
  left_join(indicator, by = "indicator") %>%
  group_by(indicator, Indicator) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) print_table(.) else .}
indicator Indicator Nobs
CPI_NWGT_COI_DT National consumer price index (CPI) by COICOP, country weights 29880

classif1

Code
CPI_NWGT_COI_DT_A %>%
  left_join(classif1, by = "classif1") %>%
  group_by(classif1, Classif1) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) print_table(.) else .}
classif1 Classif1 Nobs
COI_COICOP_CP01 COICOP2012: 1. Food and non-alcoholic beverages 2532
COI_COICOP_CP02 COICOP2012: 2. Alcoholic beverages, tobacco and narcotics 2470
COI_COICOP_CP03 COICOP2012: 3. Clothing and footwear 2529
COI_COICOP_CP04 COICOP2012: 4. Housing, water, electricity, gas and other fuels 2529
COI_COICOP_CP05 COICOP2012: 5. Furnishings, household equipment and routine household maintenance 2520
COI_COICOP_CP06 COICOP2012: 6. Health 2505
COI_COICOP_CP07 COICOP2012: 7. Transport 2529
COI_COICOP_CP08 COICOP2012: 8. Communication 2415
COI_COICOP_CP09 COICOP2012: 9. Recreation and culture 2515
COI_COICOP_CP10 COICOP2012: 10. Education 2438
COI_COICOP_CP11 COICOP2012: 11. Restaurants and hotels 2394
COI_COICOP_CP12 COICOP2012: 12. Miscellaneous goods and services 2504

source

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

time

All

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

Housing weights

Code
CPI_NWGT_COI_DT_A %>%
  filter(classif1 == "COI_COICOP_CP04") %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Weights: Example

png

Code
include_graphics3("bib/ilo/CPI_NWGT_COI_DT_A_ex2-bind1.png")

Code
include_graphics3("bib/ilo/CPI_NWGT_COI_DT_A_ex2-bind2.png")

Javascript

Code
CPI_NWGT_COI_DT_A %>%
  filter(time %in% c(2006, 2010, 2014, 2018),
         classif1 == "COI_COICOP_CP04") %>%
  left_join(ref_area, by = "ref_area") %>%
  select(ref_area, Ref_area, time, obs_value) %>%
  mutate(obs_value = round(obs_value, 1)) %>%
  spread(time, obs_value) %>%
  arrange(-`2018`) %>%
  mutate_at(vars(-1, -2), funs(ifelse(!is.na(.), ., ""))) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Ref_area)),
         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 .}