Consumer price indices (CPIs)

Data - OECD

Info

source dataset .html .RData
oecd PRICES_ALL 2025-08-25 2025-08-24

Last

Monthly

obsTime Nobs
2025-07 5119

Quarterly

obsTime Nobs
2025-Q2 2632

Annual

obsTime Nobs
2025 395

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 2092339
Q Quarterly 436620
A Annual 203849

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 2691752
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 2726092
S Seasonally adjusted, not calendar adjusted 6716

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

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 860993
PC Percentage change 848417
PA Percent per annum 832737
PD Percentage points 149605
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 197260
CP01 Food and non-alcoholic beverages 166416
CP045_0722 Energy 148171
CP045 Electricity, gas and other fuels 116194
CP041 Actual rentals for housing 113293
_TXCP01_NRG All items non-food non-energy 111799
CP02 Alcoholic beverages, tobacco and narcotics 108288
CP04 Housing, water, electricity, gas and other fuels 108288
CP08 Communication 108288
CP06 Health 108033
CP03 Clothing and footwear 107703
CP05 Furnishings, household equipment and routine household maintenance 107703
CP09 Recreation and culture 107703
CP11 Restaurants and hotels 107254
CP0722 Fuels and lubricants for personal transport equipment 106960
CP07 Transport 106938
CP12 Miscellaneous goods and services 106914
CP10 Education 105516
SERV Services 101226
CP043 Maintenance and repair of the dwelling 97754
CP044 Water supply and miscellaneous services relating to the dwelling 96907
CP041T043X042 Housing excluding imputed rentals for housing 55006
GD Goods 52633
CP041T043 Housing 49508
_TXNRG_01_02 Overall index excluding energy, food, alcohol and tobacco 36701
SERVXCP041_042_0432 Services less housing 31836
CP042 Imputed rentals for housing 31699
SERVXCP041_0432 Services less housing (Housing excluding imputed rentals for housing) 30307
CPRES Residuals 6510

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 902049
G1 Growth rate, period on period 848417
GY Growth rate, over 1 year 832737
GOY Contribution to growth rate, over 1 year 149605

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

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

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

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

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