Consumer price indices (CPIs)

Data - OECD

Info

source dataset Title .html .rData
oecd PRICES_ALL Consumer price indices (CPIs) 2026-02-10 2026-02-12

Last

Monthly

obsTime Nobs
2026-01 583

Quarterly

obsTime Nobs
2025-Q4 2490

Annual

obsTime Nobs
2025 4900

FREQ

Code
PRICES_ALL %>%
  left_join(FREQ, by = "FREQ") %>%
  group_by(FREQ, Freq) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
FREQ Freq Nobs
M Monthly 2116682
Q Quarterly 441700
A Annual 208620

MEASURE

Code
PRICES_ALL %>%
  left_join(MEASURE, by = "MEASURE") %>%
  group_by(MEASURE, Measure) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
MEASURE Measure Nobs
CPI Consumer price index 2725572
IT_W Item weights 41430

ADJUSTMENT

Code
PRICES_ALL %>%
  left_join(ADJUSTMENT, by = "ADJUSTMENT") %>%
  group_by(ADJUSTMENT, Adjustment) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
ADJUSTMENT Adjustment Nobs
N Neither seasonally adjusted nor calendar adjusted 2760246
S Seasonally adjusted, not calendar adjusted 6756

METHODOLOGY

Code
PRICES_ALL %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  group_by(METHODOLOGY, Methodology) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
METHODOLOGY Methodology Nobs
N National 1971730
HICP Eurostat harmonised index of consumer prices (HICP) 795272

UNIT_MEASURE

Code
PRICES_ALL %>%
  left_join(UNIT_MEASURE, by = "UNIT_MEASURE") %>%
  group_by(UNIT_MEASURE, Unit_measure) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
UNIT_MEASURE Unit_measure Nobs
IX Index 871437
PC Percentage change 858185
PA Percent per annum 842724
PD Percentage points 153226
10P3EXP_CNSMR Per 1 000 of consumer expenditure 41430

EXPENDITURE

Code
PRICES_ALL %>%
  left_join(EXPENDITURE, by = "EXPENDITURE") %>%
  group_by(EXPENDITURE, Expenditure) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
EXPENDITURE Expenditure Nobs
_T Total 199147
CP01 Food and non-alcoholic beverages 168249
CP045_0722 Energy 146653
CP045 Electricity, gas and other fuels 117703
CP041 Actual rentals for housing 114831
_TXCP01_NRG All items non-food non-energy 112980
CP02 Alcoholic beverages, tobacco and narcotics 109840
CP04 Housing, water, electricity, gas and other fuels 109840
CP08 Communication 109840
CP06 Health 109585
CP03 Clothing and footwear 109252
CP05 Furnishings, household equipment and routine household maintenance 109252
CP09 Recreation and culture 109252
CP11 Restaurants and hotels 108803
CP07 Transport 108487
CP0722 Fuels and lubricants for personal transport equipment 108467
CP12 Miscellaneous goods and services 108463
CP10 Education 107039
SERV Services 102603
CP044 Water supply and miscellaneous services relating to the dwelling 99354
CP043 Maintenance and repair of the dwelling 99215
CP041T043X042 Housing excluding imputed rentals for housing 55710
GD Goods 54173
CP041T043 Housing 49414
_TXNRG_01_02 Overall index excluding energy, food, alcohol and tobacco 37267
SERVXCP041_042_0432 Services less housing 32107
CP042 Imputed rentals for housing 32051
SERVXCP041_0432 Services less housing (Housing excluding imputed rentals for housing) 30758
CPRES Residuals 6667

TRANSFORMATION

Code
PRICES_ALL %>%
  left_join(TRANSFORMATION, by = "TRANSFORMATION") %>%
  group_by(TRANSFORMATION, Transformation) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  print_table_conditional
TRANSFORMATION Transformation Nobs
_Z Not applicable 912867
G1 Growth rate, period on period 858185
GY Growth rate, over 1 year 842724
GOY Contribution to growth rate, over 1 year 153226

REF_AREA

Code
PRICES_ALL %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  group_by(REF_AREA, Ref_area) %>%
  summarise(Nobs = sum(!is.na(obsValue))) %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Ref_area)),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

obsTime

Code
PRICES_ALL %>%
  filter(!is.na(obsValue)) %>%
  group_by(obsTime) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(obsTime)) %>%
  print_table_conditional

Europe vs. US

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("EA20", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("EA20", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("EA20", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  mutate(Ref_area = ifelse(REF_AREA == "EA20", "Europe", Ref_area)) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_3flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

France vs. Germany

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "DEU"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

1999-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "DEU"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1999-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "DEU"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

France vs. USA

CP041 - rents

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP041",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP041)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2002-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP041",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP041)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2010-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP041",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2010-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP041)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP041",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP041)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

GD

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "GD",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2002-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "GD",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "GD",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (GD)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

CP07

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP07",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2002-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP07",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP07",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP07)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2020-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP07",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2020-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP07)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

CP09

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP09",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2002-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP09",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP09",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP09)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

CP08

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP08",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP08)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2002-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP08",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP08)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "CP08",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index (CP08)") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

All

1996-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("1996-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2002-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2002-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2017-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2017-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))

2019-

Code
PRICES_ALL %>%
  filter(EXPENDITURE == "_T",
         REF_AREA %in% c("FRA", "USA"),
         ADJUSTMENT == "N",
         MEASURE == "CPI",
         TRANSFORMATION == "_Z",
         FREQ == "M") %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  left_join(METHODOLOGY, by = "METHODOLOGY") %>%
  month_to_date() %>%
  filter(date >= as.Date("2019-01-01")) %>%
  group_by(Ref_area, Methodology) %>%
  arrange(date) %>%
  mutate(obsValue = 100*obsValue/obsValue[1]) %>%
  left_join(colors, by = c("Ref_area"  = "country")) %>%
  ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color, linetype = Methodology)) + 
  scale_color_identity() +
  scale_linetype_manual(values = c("dashed", "solid")) + add_flags +
  theme_minimal() + xlab("") + ylab("Price Index") +
  scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  theme(legend.position = c(0.35, 0.8),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) + 
  scale_y_log10(breaks = seq(10, 200, 5))