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

Data - ECB

Code
JDF_ICP_COICOP_INX <- read_parquet("JDF_ICP_COICOP_INX.parquet")
FREQ <- read_parquet("FREQ.parquet")
REF_AREA <- read_parquet("REF_AREA.parquet")
ADJUSTMENT <- read_parquet("ADJUSTMENT.parquet")
ICP_ITEM <- read_parquet("ICP_ITEM.parquet")
STS_INSTITUTION <- read_parquet("STS_INSTITUTION.parquet")
ICP_SUFFIX <- read_parquet("ICP_SUFFIX.parquet")

Structure

Nobs

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

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 .}

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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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, 2100, 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") |>
  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 .}