HICP - Indices, breakdown by purpose of consumption(2015=100) - JDF_ICP_COICOP_INX

Data - ECB

Code
load_data("ecb/JDF_ICP_COICOP_INX.RData")
load_data("ecb/FREQ.RData")
load_data("ecb/REF_AREA.RData")
load_data("ecb/ADJUSTMENT.RData")
load_data("ecb/ICP_ITEM.RData")
load_data("ecb/STS_INSTITUTION.RData")
load_data("ecb/ICP_SUFFIX.RData")

Nobs

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

ICP_ITEM

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

ICP_SUFFIX

Code
JDF_ICP_COICOP_INX %>%
  left_join(ICP_SUFFIX,  by = "ICP_SUFFIX") %>%
  group_by(ICP_SUFFIX, Icp_suffix) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
ICP_SUFFIX Icp_suffix Nobs
INX Index 1151421

UNIT

Code
JDF_ICP_COICOP_INX %>%
  group_by(UNIT) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
UNIT Nobs
PURE_NUMB 1151421

TITLE

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

FREQ

Code
JDF_ICP_COICOP_INX %>%
  left_join(FREQ,  by = "FREQ") %>%
  group_by(FREQ, Freq) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
FREQ Freq Nobs
M Monthly 1151421

REF_AREA

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

ADJUSTMENT

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

STS_INSTITUTION

Code
JDF_ICP_COICOP_INX %>%
  left_join(STS_INSTITUTION,  by = "STS_INSTITUTION") %>%
  group_by(STS_INSTITUTION, Sts_institution) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
STS_INSTITUTION Sts_institution Nobs
4 Eurostat 1151421

UNIT_INDEX_BASE

Code
JDF_ICP_COICOP_INX %>%
  group_by(UNIT_INDEX_BASE) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
UNIT_INDEX_BASE Nobs
2015 = 100 1132396
2005 = 100 19025

DECIMALS

Code
JDF_ICP_COICOP_INX %>%
  group_by(DECIMALS) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
DECIMALS Nobs
2 989160
1 162261

TIME_FORMAT

Code
JDF_ICP_COICOP_INX %>%
  group_by(TIME_FORMAT) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
TIME_FORMAT Nobs
P1M 1151421

Info

Ex 1: Harmonised Index of Consumer Prices - HICP

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("DE", "FR", "GB"),
         # 000000: HICP - Overall index
         ICP_ITEM == "000000",
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100") %>%
  left_join(REF_AREA,  by = "REF_AREA") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Ref_area)) + 
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.75, 0.3),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 2A: Decompose between Services and Goods in France

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("FR"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("SERV00", "040000", "IGXE00"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 2B: Decompose between Services and Goods in Germany

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("DE"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("SERV00", "040000", "IGXE00"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 2C: Decompose between Services and Goods in Greece

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("GR"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("SERV00", "040000", "IGXE00"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 2D: Decompose between Services and Goods in Portugal

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("PT"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("SERV00", "040000", "IGXE00"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(4)[1:3]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 3A: Decompose between Services and Goods in Germany

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("DE"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("110000", "120000", "030000", "041000"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(5)[1:4]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.35, 0.85),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 3B: Decompose between Services and Goods in France

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("FR"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("110000", "120000", "030000", "041000"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(5)[1:4]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.75, 0.25),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 3C: Decompose between Services and Goods in Greece

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("GR"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("110000", "120000", "030000", "041000"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(5)[1:4]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.75, 0.25),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 3D: Decompose between Services and Goods in Portugal

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("PT"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("110000", "120000", "030000", "041000"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(5)[1:4]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.75, 0.25),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 4: Price of Energy

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("DE"),
         # 000000: HICP - Overall index
         ICP_ITEM %in% c("NRGY00", "ELGAS0", "045500"),
         FREQ == "M",
         ICP_SUFFIX == "INX") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue)) %>%
  ggplot() + 
  geom_line(aes(x = date, y = obsValue, color = Icp_item)) + 
  scale_color_manual(values = viridis(5)[1:4]) +
  theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.75, 0.25),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(0, 200, 5),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  ylab("HICP - Overall index") + xlab("")

Ex 5: Deflation in Greece

Code
JDF_ICP_COICOP_INX %>%
  filter(REF_AREA %in% c("GR"),
         FREQ == "M",
         UNIT_INDEX_BASE == "2015 = 100",
         UNIT == "PURE_NUMB") %>%
  left_join(ICP_ITEM, by = "ICP_ITEM") %>%
  month_to_date() %>%
  filter(!is.na(obsValue),
         date %in% as.Date(paste0(c(2012, 2014), "-01-01"))) %>%
  select(date, ICP_ITEM, TITLE, obsValue) %>%
  group_by(ICP_ITEM, TITLE) %>%
  summarise(`% change` = round(100*(obsValue[2] - obsValue[1])/obsValue[1], 1)) %>%
  arrange(`% change`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}