Consumer price indices (CPIs)

Data - OECD

Info

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

Last

Monthly

obsTime Nobs
2025-12 894

Quarterly

obsTime Nobs
2025-Q4 560

Annual

obsTime Nobs
2025 955

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 2113660
Q Quarterly 440357
A Annual 204557

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 2717518
IT_W Item weights 41056

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 2751834
S Seasonally adjusted, not calendar adjusted 6740

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 1967276
HICP Eurostat harmonised index of consumer prices (HICP) 791298

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 868661
PC Percentage change 856139
PA Percent per annum 840123
PD Percentage points 152595
10P3EXP_CNSMR Per 1 000 of consumer expenditure 41056

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 198350
CP01 Food and non-alcoholic beverages 167647
CP045_0722 Energy 149358
CP045 Electricity, gas and other fuels 117247
CP041 Actual rentals for housing 114349
_TXCP01_NRG All items non-food non-energy 112598
CP02 Alcoholic beverages, tobacco and narcotics 109370
CP04 Housing, water, electricity, gas and other fuels 109370
CP08 Communication 109370
CP06 Health 109115
CP03 Clothing and footwear 108782
CP05 Furnishings, household equipment and routine household maintenance 108782
CP09 Recreation and culture 108782
CP11 Restaurants and hotels 108333
CP07 Transport 108017
CP0722 Fuels and lubricants for personal transport equipment 108012
CP12 Miscellaneous goods and services 107993
CP10 Education 106579
SERV Services 102214
CP043 Maintenance and repair of the dwelling 98780
CP044 Water supply and miscellaneous services relating to the dwelling 97955
CP041T043X042 Housing excluding imputed rentals for housing 55513
GD Goods 53936
CP041T043 Housing 49792
_TXNRG_01_02 Overall index excluding energy, food, alcohol and tobacco 37112
SERVXCP041_042_0432 Services less housing 32000
CP042 Imputed rentals for housing 31934
SERVXCP041_0432 Services less housing (Housing excluding imputed rentals for housing) 30645
CPRES Residuals 6639

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 909717
G1 Growth rate, period on period 856139
GY Growth rate, over 1 year 840123
GOY Contribution to growth rate, over 1 year 152595

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))