Consumer price indices (CPIs)

Data - OECD

Info

source dataset Title .html .rData
oecd PRICES_ALL Consumer price indices (CPIs) 2026-02-22 2026-03-09

Last

Monthly

obsTime Nobs
2026-02 100

Quarterly

obsTime Nobs
2025-Q4 2489

Annual

obsTime Nobs
2025 4897

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 2112567
Q Quarterly 440152
A Annual 207891

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 2719428
IT_W Item weights 41182

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 2753853
S Seasonally adjusted, not calendar adjusted 6757

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 1965338
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 871380
PC Percentage change 855374
PA Percent per annum 839424
PD Percentage points 153250
10P3EXP_CNSMR Per 1 000 of consumer expenditure 41182

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 199111
CP01 Food and non-alcoholic beverages 166314
CP045_0722 Energy 148749
CP045 Electricity, gas and other fuels 115140
CP041 Actual rentals for housing 114835
_TXCP01_NRG All items non-food non-energy 112937
CP04 Housing, water, electricity, gas and other fuels 109844
CP08 Communication 109844
CP06 Health 109589
CP03 Clothing and footwear 109256
CP05 Furnishings, household equipment and routine household maintenance 109256
CP09 Recreation and culture 109256
CP02 Alcoholic beverages, tobacco and narcotics 109114
CP11 Restaurants and hotels 108807
CP07 Transport 108491
CP0722 Fuels and lubricants for personal transport equipment 108471
CP12 Miscellaneous goods and services 108467
CP10 Education 107043
SERV Services 101884
CP044 Water supply and miscellaneous services relating to the dwelling 99358
CP043 Maintenance and repair of the dwelling 99219
CP041T043X042 Housing excluding imputed rentals for housing 55672
GD Goods 54179
CP041T043 Housing 47578
_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) 30103
CPRES Residuals 6668

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 912562
G1 Growth rate, period on period 855374
GY Growth rate, over 1 year 839424
GOY Contribution to growth rate, over 1 year 153250

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