source | dataset | .html | .RData |
---|---|---|---|
oecd | PRICES_CPI | 2024-04-15 | 2024-04-15 |
source | dataset | .html | .RData |
---|---|---|---|
bis | CPI | 2024-04-15 | 2022-01-20 |
ecb | CES | 2024-04-15 | 2024-01-12 |
eurostat | nama_10_co3_p3 | 2024-04-15 | 2024-04-15 |
eurostat | prc_hicp_cow | 2024-04-15 | 2024-04-15 |
eurostat | prc_hicp_ctrb | 2024-04-15 | 2024-04-09 |
eurostat | prc_hicp_inw | 2024-04-15 | 2024-04-09 |
eurostat | prc_hicp_manr | 2024-04-15 | 2024-04-15 |
eurostat | prc_hicp_midx | 2024-04-15 | 2024-04-09 |
eurostat | prc_hicp_mmor | 2024-04-15 | 2024-04-15 |
eurostat | prc_ppp_ind | 2024-04-15 | 2024-04-09 |
eurostat | sts_inpp_m | 2024-04-15 | 2024-04-15 |
eurostat | sts_inppd_m | 2024-04-15 | 2024-04-15 |
eurostat | sts_inppnd_m | 2024-04-15 | 2024-04-09 |
fred | cpi | 2024-04-15 | 2024-04-15 |
fred | inflation | 2024-04-15 | 2024-04-15 |
imf | CPI | 2024-01-06 | 2020-03-13 |
oecd | MEI_PRICES_PPI | 2024-04-16 | 2024-04-15 |
oecd | PPP2017 | 2024-04-16 | 2023-07-25 |
oecd | PRICES_CPI | 2024-04-15 | 2024-04-15 |
wdi | FP.CPI.TOTL.ZG | 2023-01-15 | 2024-04-14 |
wdi | NY.GDP.DEFL.KD.ZG | 2024-04-14 | 2024-04-14 |
dataset | LAST_DOWNLOAD |
---|---|
PRICES_CPI | 2024-04-15 |
PRICES_CPI_5 | 2024-04-15 |
PRICES_CPI_4 | 2024-02-03 |
PRICES_CPI_3 | 2024-02-03 |
PRICES_CPI_2 | 2024-02-03 |
PRICES_CPI_1 | 2023-12-10 |
obsTime | Nobs |
---|---|
2023-12 | 6027 |
obsTime | Nobs |
---|---|
2023-Q4 | 3550 |
obsTime | Nobs |
---|---|
2023 | 5721 |
PRICES_CPI %>%
left_join(PRICES_CPI_var$MEASURE, by = "MEASURE") %>%
group_by(MEASURE, Measure) %>%
summarise(Nobs = sum(!is.na(obsValue))) %>%
arrange(-Nobs) %>%
print_table_conditional
MEASURE | Measure | Nobs |
---|---|---|
IXOB | Index | 776265 |
GP | Percentage change from previous period | 775520 |
GY | Percentage change on the same period of the previous year | 761186 |
IXNB | National Index | 316846 |
CTGY | Contribution to annual inflation | 137374 |
AL | Per thousand of the National CPI Total | 38265 |
IXOBSA | Index, s.a | 6871 |
PRICES_CPI %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
group_by(LOCATION, Location) %>%
summarise(Nobs = sum(!is.na(obsValue))) %>%
arrange(-Nobs) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
line_US <- PRICES_CPI %>%
filter(MEASURE == "CTGY",
LOCATION %in% c("USA"),
SUBJECT %in% c("CPALTT01", "CPGREN01", "CP010000", "CP020000")) %>%
month_to_date %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, obsValue, SUBJECT) %>%
spread(SUBJECT, obsValue) %>%
transmute(date, `Total inflation` = CPALTT01,
FOOD = CP010000 + CP020000,
NRG = CPGREN01,
`Core inflation` = CPALTT01-FOOD-NRG) %>%
select(date, `Total inflation`, `Core inflation`) %>%
gather(Coicop, values, -date) %>%
mutate(Coicop = factor(Coicop, levels = c("Total inflation", "Core inflation")),
Geo = "US")
bars_US <- PRICES_CPI %>%
filter(MEASURE == "CTGY",
LOCATION %in% c("USA")) %>%
#filter(obsTime == "2023-09") %>%
filter(SUBJECT %in% c("CPGRLE01", "CPGREN01", "CP010000", "CP020000",
"CPALTT01", "CP040100", "CP040200")) %>%
month_to_date %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, obsValue, SUBJECT) %>%
spread(SUBJECT, obsValue) %>%
transmute(date,
FOOD = CP010000 + CP020000,
NRG = CPGREN01,
RENTS = CP040100+CP040200,
TOT_X_NRG_FOOD_RENTS = CPALTT01-FOOD-NRG-RENTS) %>%
gather(coicop, values, -date) %>%
# CP070200, CP040500, CP010000
# CPGRSE01, CPGRGO01
mutate(Coicop = factor(coicop, levels = c("FOOD", "NRG", "RENTS", "TOT_X_NRG_FOOD_RENTS"),
labels = c("Food", "Energy", "Rents",
"Total less Energy, Food and Rents")),
Geo = "US")
bars_US %>%
ggplot(., aes(x = date, y = values/100)) +
geom_col(aes(fill = Coicop), alpha = 1) +
geom_line(data = line_US, aes(linetype = Coicop), size = 1.2) +
theme_minimal() + xlab("") + ylab("Contributions to inflation") +
scale_fill_manual(values = c("forestgreen","orange", "grey", "blue")) +
scale_x_date(breaks ="3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-10, 30, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = "top",
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
guides(fill=guide_legend(nrow=2))
load_data("eurostat/prc_hicp_ctrb.RData")
line_EU <- prc_hicp_ctrb %>%
filter(coicop %in% c("NRG", "FOOD", "CP01", "CP02", "CP03", "CP04", "CP05", "CP06",
"CP07", "CP08", "CP09", "CP10", "CP11", "CP12", "CP041")) %>%
mutate(date = gsub("M", "-", time) %>% paste0(., "-01") %>% as.Date) %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, values, coicop) %>%
spread(coicop, values) %>%
transmute(date,
`Total inflation` = CP01+CP02+CP03+CP04+CP05+CP06+CP07+CP08+CP09+CP10+CP11+CP12,
FOOD,
NRG,
`Core inflation` = `Total inflation`-FOOD-NRG) %>%
select(date, `Total inflation`, `Core inflation`) %>%
gather(Coicop, values, -date) %>%
mutate(Coicop = factor(Coicop, levels = c("Total inflation", "Core inflation")),
Geo = "Euro area")
bars_EU <- prc_hicp_ctrb %>%
filter(coicop %in% c("NRG", "FOOD", "CP01", "CP02", "CP03", "CP04", "CP05", "CP06",
"CP07", "CP08", "CP09", "CP10", "CP11", "CP12", "CP041")) %>%
mutate(date = gsub("M", "-", time) %>% paste0(., "-01") %>% as.Date) %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, values, coicop) %>%
spread(coicop, values) %>%
transmute(date,
FOOD,
NRG,
RENTS = CP041,
`Total inflation` = CP01+CP02+CP03+CP04+CP05+CP06+CP07+CP08+CP09+CP10+CP11+CP12,
TOT_X_NRG_FOOD_RENTS = `Total inflation`-FOOD-NRG-RENTS) %>%
select(-`Total inflation`) %>%
gather(coicop, values, -date) %>%
# CP070200, CP040500, CP010000
# CPGRSE01, CPGRGO01
mutate(Coicop = factor(coicop, levels = c("FOOD", "NRG", "RENTS", "TOT_X_NRG_FOOD_RENTS"),
labels = c("Food", "Energy", "Rents",
"Total less Energy, Food and Rents")),
Geo = "Euro area")
bars_EU %>%
ggplot(., aes(x = date, y = values/100)) +
geom_col(aes(fill = Coicop), alpha = 1) +
geom_line(data = line_EU, aes(linetype = Coicop), size = 1.2) +
theme_minimal() + xlab("") + ylab("Contributions to inflation") +
scale_fill_manual(values = c("forestgreen","orange", "grey", "blue")) +
scale_x_date(breaks ="3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-10, 30, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = "top",
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
guides(fill=guide_legend(nrow=2))
bars_EU %>%
bind_rows(bars_US) %>%
ggplot(., aes(x = date, y = values/100)) +
geom_col(aes(fill = Coicop), alpha = 1) +
geom_line(data = line_EU %>% bind_rows(line_US), aes(linetype = Coicop), size = 1.2) +
theme_minimal() + xlab("") + ylab("Contributions to inflation") +
scale_fill_manual(values = c("forestgreen","orange", "grey", "blue")) +
scale_x_date(breaks ="3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-10, 30, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = "top",
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
guides(fill=guide_legend(nrow=2)) +
facet_wrap(~ Geo)
# [1] "fr_CA.UTF-8"
line_US <- PRICES_CPI %>%
filter(MEASURE == "CTGY",
LOCATION %in% c("USA"),
SUBJECT %in% c("CPALTT01", "CPGREN01", "CP010000", "CP020000")) %>%
month_to_date %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, obsValue, SUBJECT) %>%
spread(SUBJECT, obsValue) %>%
transmute(date, `Total inflation` = CPALTT01,
FOOD = CP010000 + CP020000,
NRG = CPGREN01,
`Core inflation` = CPALTT01-FOOD-NRG) %>%
select(date, Inflation = `Total inflation`, `Inflation sous-jacente` = `Core inflation`) %>%
gather(Coicop, values, -date) %>%
mutate(Coicop = factor(Coicop, levels = c("Inflation", "Inflation sous-jacente")),
Geo = "États-Unis")
bars_US <- PRICES_CPI %>%
filter(MEASURE == "CTGY",
LOCATION %in% c("USA")) %>%
#filter(obsTime == "2023-09") %>%
filter(SUBJECT %in% c("CPGRLE01", "CPGREN01", "CP010000", "CP020000",
"CPALTT01", "CP040100", "CP040200")) %>%
month_to_date %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, obsValue, SUBJECT) %>%
spread(SUBJECT, obsValue) %>%
transmute(date,
FOOD = CP010000 + CP020000,
NRG = CPGREN01,
RENTS = CP040100+CP040200,
TOT_X_NRG_FOOD_RENTS = CPALTT01-FOOD-NRG-RENTS) %>%
gather(coicop, values, -date) %>%
# CP070200, CP040500, CP010000
# CPGRSE01, CPGRGO01
mutate(Coicop = factor(coicop, levels = c("FOOD", "NRG", "RENTS", "TOT_X_NRG_FOOD_RENTS"),
labels = c("Alimentation", "Énergie", "Loyers",
"Total sans énergie, alimentation, loyers")),
Geo = "États-Unis")
bars_US %>%
ggplot(., aes(x = date, y = values/100)) +
geom_col(aes(fill = Coicop), alpha = 1) +
geom_line(data = line_US, aes(linetype = Coicop), size = 1.2) +
theme_minimal() + xlab("") + ylab("Contributions à l'inflation") +
scale_fill_manual(values = c("forestgreen","orange", "grey", "blue")) +
scale_x_date(breaks ="3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-10, 30, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = "top",
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
guides(fill=guide_legend(nrow=2))
# [1] "fr_CA.UTF-8"
load_data("eurostat/prc_hicp_ctrb.RData")
line_EU <- prc_hicp_ctrb %>%
filter(coicop %in% c("NRG", "FOOD", "CP01", "CP02", "CP03", "CP04", "CP05", "CP06",
"CP07", "CP08", "CP09", "CP10", "CP11", "CP12", "CP041")) %>%
mutate(date = gsub("M", "-", time) %>% paste0(., "-01") %>% as.Date) %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, values, coicop) %>%
spread(coicop, values) %>%
transmute(date,
`Total inflation` = CP01+CP02+CP03+CP04+CP05+CP06+CP07+CP08+CP09+CP10+CP11+CP12,
FOOD,
NRG,
`Core inflation` = `Total inflation`-FOOD-NRG) %>%
select(date, Inflation = `Total inflation`, `Inflation sous-jacente` = `Core inflation`) %>%
gather(Coicop, values, -date) %>%
mutate(Coicop = factor(Coicop, levels = c("Inflation", "Inflation sous-jacente")),
Geo = "Zone euro")
bars_EU <- prc_hicp_ctrb %>%
filter(coicop %in% c("NRG", "FOOD", "CP01", "CP02", "CP03", "CP04", "CP05", "CP06",
"CP07", "CP08", "CP09", "CP10", "CP11", "CP12", "CP041")) %>%
mutate(date = gsub("M", "-", time) %>% paste0(., "-01") %>% as.Date) %>%
filter(date >= as.Date("2020-01-01")) %>%
select(date, values, coicop) %>%
spread(coicop, values) %>%
transmute(date,
FOOD,
NRG,
RENTS = CP041,
`Total inflation` = CP01+CP02+CP03+CP04+CP05+CP06+CP07+CP08+CP09+CP10+CP11+CP12,
TOT_X_NRG_FOOD_RENTS = `Total inflation`-FOOD-NRG-RENTS) %>%
select(-`Total inflation`) %>%
gather(coicop, values, -date) %>%
# CP070200, CP040500, CP010000
# CPGRSE01, CPGRGO01
mutate(Coicop = factor(coicop, levels = c("FOOD", "NRG", "RENTS", "TOT_X_NRG_FOOD_RENTS"),
labels = c("Alimentation", "Énergie", "Loyers",
"Total sans énergie, alimentation, loyers")),
Geo = "Zone euro")
bars_EU %>%
ggplot(., aes(x = date, y = values/100)) +
geom_col(aes(fill = Coicop), alpha = 1) +
geom_line(data = line_EU, aes(linetype = Coicop), size = 1.2) +
theme_minimal() + xlab("") + ylab("Contributions à l'inflation") +
scale_fill_manual(values = c("forestgreen","orange", "grey", "blue")) +
scale_x_date(breaks ="3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-10, 30, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = "top",
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
guides(fill=guide_legend(nrow=2))
bars_EU %>%
bind_rows(bars_US) %>%
mutate(Geo = factor(Geo, levels = c("Zone euro", "États-Unis"))) %>%
ggplot(., aes(x = date, y = values/100)) +
geom_col(aes(fill = Coicop), alpha = 1) +
geom_line(data = line_EU %>%
bind_rows(line_US) %>%
mutate(Geo = factor(Geo, levels = c("Zone euro", "États-Unis"))),
aes(linetype = Coicop), size = 1.2) +
theme_minimal() + xlab("") + ylab("Contributions à l'inflation") +
scale_fill_manual(values = c("forestgreen","orange", "grey", "blue")) +
scale_x_date(breaks ="3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-10, 30, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = "top",
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
guides(fill=guide_legend(nrow=2)) +
facet_wrap(~ Geo)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
filter(date >= as.Date("1996-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
group_by(LOCATION, Subject) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
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.15, 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))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
filter(date >= as.Date("1999-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
group_by(LOCATION, Subject) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
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.15, 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))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
filter(date >= as.Date("2008-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
group_by(LOCATION, Subject) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
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.15, 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))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
filter(date >= as.Date("2015-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
group_by(LOCATION, Subject) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
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.15, 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))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
filter(date >= as.Date("2017-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
group_by(LOCATION, Subject) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
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.15, 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))
PRICES_CPI %>%
filter(SUBJECT == "CPALTT01",
MEASURE == "GP") %>%
group_by(LOCATION, FREQUENCY) %>%
summarise(Nobs = n()) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
spread(FREQUENCY, Nobs) %>%
arrange(-M) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(SUBJECT == "CPHPTT01",
MEASURE == "GY") %>%
group_by(LOCATION, FREQUENCY) %>%
summarise(Nobs = n()) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
spread(FREQUENCY, Nobs) %>%
arrange(-M) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(LOCATION %in% c("KOR"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue)) +
scale_color_identity() +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("POL", "HUN"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("POL", "HUN"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "CAN"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "CAN"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location2, linetype = Location2)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) +
add_2flags +
theme_minimal() + xlab("") + ylab("Inflation, Glissement sur un an (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.7, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= as.Date("2015-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location2)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) +
add_2flags +
theme_minimal() + xlab("") + ylab("Inflation, Glissement sur un an (%)") +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.2, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= as.Date("2015-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
theme(legend.position = c(0.15, 0.8),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= as.Date("2020-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location2)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) +
add_2flags +
theme_minimal() + xlab("") + ylab("Inflation, Glissement sur un an (%)") +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.2, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= as.Date("2020-01-01")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, size = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_size_manual(values = c(0.5, 1)) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.15, 0.8),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(data = . %>%
filter(month(date) %in% c(1, 6)), aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_2flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.15, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_2flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.15, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.15, 0.8),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(1)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_2flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = "1 month",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.8, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPHPTT01", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, SUBJECT, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(1)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(Location2 = ifelse(LOCATION == "DEU", "Allemagne", Location)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = Location, linetype = Subject)) +
scale_color_manual(values = c("#000000", "#ED2939")) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_x_date(breaks = "1 month",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.8, 0.7),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU", "USA"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
#mutate(color = ifelse(LOCATION == "DEU", color2, color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_linetype_manual(values = c("dashed", "solid")) + add_3flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_color_identity() +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.1, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU", "USA", "EA20"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
mutate(Location = ifelse(LOCATION == "EA20", "Europe", Location)) %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "EA20", color2, color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_color_identity() +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.1, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU", "USA", "EA20"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(1)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
mutate(Location = ifelse(LOCATION == "EA20", "Europe", Location)) %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "EA20", color2, color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)") +
scale_color_identity() +
scale_x_date(breaks = "1 month",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.1, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU", "USA", "EA20"),
SUBJECT %in% c("CPGRLE01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
mutate(Location = ifelse(LOCATION == "EA20", "Europe", Location)) %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "EA20", color2, color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_linetype_manual(values = c("dashed", "solid")) + add_4flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)\nCPI: All items non-food non-energy") +
scale_color_identity() +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.1, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU", "USA", "EA20"),
SUBJECT %in% c("CPGRHO01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
filter(date >= Sys.Date() -years(2)) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
mutate(Location = ifelse(LOCATION == "EA20", "Europe", Location)) %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "EA20", color2, color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_linetype_manual(values = c("dashed", "solid")) + add_2flags +
theme_minimal() + xlab("") + ylab("1 year inflation (%)\nCPI: All items non-food non-energy") +
scale_color_identity() +
scale_x_date(breaks = "2 months",
labels = date_format("%b %Y")) +
theme(legend.position = c(0.1, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
geom_text_repel(aes(x = date, y = obsValue, label = percent(obsValue, acc = 0.1)),
fontface ="plain", color = "black", size = 3)
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue)) +
scale_color_identity() +
theme_minimal() + xlab("") + ylab("Inflation, Glissement sur un an (%)") +
scale_x_date(breaks = seq(1960, 2100, 10) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("AUT", "BEL", "GRC", "ESP"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("CHE", "KOR", "FIN", "IND"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("CHE", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("CHE", "DEU", "USA", "FRA", "ESP"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_5flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("CHE", "DEU", "USA", "FRA", "ESP"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_5flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("CHE", "DEU", "USA", "FRA", "ESP"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "GY") %>%
month_to_date %>%
filter(date >= as.Date("2030-01-01")) %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_5flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
scale_x_date(breaks = "3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("USA", "GBR"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(color = ifelse(LOCATION == "BEL", "#000000", color)) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(LOCATION %in% c("PRT", "SWE", "LUX", "NOR"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "A",
MEASURE == "GP") %>%
year_to_date %>%
select(date, LOCATION, obsValue) %>%
mutate(obsValue = obsValue / 100) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Inflation (%)") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = percent_format(acc = 1))
PRICES_CPI %>%
filter(SUBJECT %in% c("CP080000"),
FREQUENCY == "A",
MEASURE == "IXOB") %>%
select_if(~n_distinct(.) > 1) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
group_by(LOCATION, Location) %>%
arrange(obsTime) %>%
mutate(obsTime = as.numeric(obsTime)) %>%
summarise(obsTime_first = first(obsTime),
obsTime_last = last(obsTime),
obsValue_first = first(obsValue),
obsValue_last = last(obsValue)) %>%
arrange(obsTime_first) %>%
print_table_conditional
PRICES_CPI %>%
filter(SUBJECT %in% c("CP080000"),
FREQUENCY == "A",
MEASURE == "IXOB",
obsTime %in% c("1990", "2020")) %>%
select_if(~n_distinct(.) > 1) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
spread(obsTime, obsValue) %>%
filter(!is.na(`1990`)) %>%
mutate(growth = 100*((`2020`/`1990`)^(1/30)-1)) %>%
arrange(growth) %>%
print_table_conditional
LOCATION | Location | 1990 | 2020 | growth |
---|---|---|---|---|
NOR | Norway | 260.15000 | 115.00000 | -2.6843995 |
CHE | Switzerland | 180.84990 | 97.85236 | -2.0265426 |
FRA | France | 158.38080 | 91.96333 | -1.7957224 |
SWE | Sweden | 123.64790 | 76.65689 | -1.5810301 |
KOR | Korea | 153.20270 | 95.22109 | -1.5727032 |
JPN | Japan | 143.60830 | 91.08334 | -1.5062559 |
IRL | Ireland | 120.92620 | 86.08759 | -1.1263262 |
AUS | Australia | 92.06799 | 79.80943 | -0.4751531 |
ISR | Israel | 74.57627 | 80.01849 | 0.2350604 |
GBR | United Kingdom | 104.20000 | 114.10000 | 0.3030019 |
PRT | Portugal | 80.20266 | 101.26370 | 0.7802661 |
PRICES_CPI %>%
filter(LOCATION %in% c("NOR", "CHE", "FRA", "SWE", "KOR"),
SUBJECT %in% c("CP080000", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP080000)) %>%
mutate(obsValue = 100*CP080000/CPALTT01) %>%
group_by(LOCATION) %>%
filter(date >= as.Date("1990-01-01")) %>%
mutate(obsValue = 100*obsValue/obsValue[date == as.Date("1990-01-01")]) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_5flags +
theme_minimal() + xlab("") + ylab("CPI, Real Communication") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("JPN", "IRL", "AUS", "ISR", "GBR"),
SUBJECT %in% c("CP080000", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP080000)) %>%
mutate(obsValue = 100*CP080000/CPALTT01) %>%
group_by(LOCATION) %>%
filter(date >= as.Date("1990-01-01")) %>%
mutate(obsValue = 100*obsValue/obsValue[date == as.Date("1990-01-01")]) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_5flags +
theme_minimal() + xlab("") + ylab("CPI, Real Communication") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT %in% c("CP080000", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP080000)) %>%
mutate(obsValue = 100*CP080000/CPALTT01) %>%
group_by(LOCATION) %>%
mutate(obsValue = 100*obsValue/obsValue[date == as.Date("2010-01-01")]) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Communication") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU", "JPN"),
SUBJECT %in% c("CP080000", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP080000)) %>%
mutate(obsValue = 100*CP080000/CPALTT01) %>%
group_by(LOCATION) %>%
filter(date >= as.Date("1991-01-01")) %>%
mutate(obsValue = 100*obsValue/obsValue[date == as.Date("1991-01-01")]) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_3flags +
theme_minimal() + xlab("") + ylab("CPI, Real Communication") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("KOR", "CAN", "PRT", "ESP"),
SUBJECT %in% c("CP080000", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP080000)) %>%
mutate(obsValue = 100*CP080000/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Communication") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("DNK", "AUS", "AUT", "BEL"),
SUBJECT %in% c("CP080000", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP080000)) %>%
mutate(obsValue = 100*CP080000/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Communication") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
theme(legend.position = c(0.2, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(SUBJECT %in% c("CP040100"),
MEASURE == "IXOB") %>%
group_by(LOCATION, FREQUENCY) %>%
summarise(Nobs = n()) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
spread(FREQUENCY, Nobs) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "A",
MEASURE == "IXOB",
obsTime %in% c("1978", "1988", "1998", "2008", "2018")) %>%
select(SUBJECT, obsTime, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = round(100*CP040100/CPALTT01, 1)) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
select(LOCATION, Location, obsTime, rents_real) %>%
spread(obsTime, rents_real) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(MEASURE == "AL",
SUBJECT %in% c("PWCP0410", "PWCP0420", "PWCP0400"),
obsTime %in% c("2017")) %>%
left_join(tibble(SUBJECT = c("PWCP0410", "PWCP0420", "PWCP0400"),
Subject = c("Rents (actual)", "Rents (imputed)", "Housing")),
by = "SUBJECT") %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
select(Location, Subject, obsValue) %>%
mutate(obsValue = round(obsValue/10, 1)) %>%
spread(Subject, obsValue) %>%
mutate(`Rents (Total)` = `Rents (actual)` + ifelse(is.na(`Rents (imputed)`), 0, `Rents (imputed)`)) %>%
arrange(`Rents (Total)`) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(MEASURE == "AL",
SUBJECT %in% c("PWCP0410", "PWCP0420", "PWCP0400"),
obsTime %in% c("2019")) %>%
left_join(tibble(SUBJECT = c("PWCP0410", "PWCP0420", "PWCP0400"),
Subject = c("Rents (actual)", "Rents (imputed)", "Housing")),
by = "SUBJECT") %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
select(Location, Subject, obsValue) %>%
mutate(obsValue = round(obsValue/10, 1)) %>%
spread(Subject, obsValue) %>%
mutate(`Rents (Total)` = `Rents (actual)` + ifelse(is.na(`Rents (imputed)`), 0, `Rents (imputed)`)) %>%
arrange(`Rents (Total)`) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0100") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0200") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0800") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0400") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0410") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0420") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0300") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0500") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0600") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0700") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP0900") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP1000") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP1100") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "ITA", "DEU", "USA"),
MEASURE == "AL",
FREQUENCY == "A",
SUBJECT == "PWCP1200") %>%
year_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
mutate(obsValue = obsValue/1000) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("Weights") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISR"),
MEASURE == "AL",
FREQUENCY == "A",
obsTime %in% c("1994", "1999", "2009", "2019")) %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
select(SUBJECT, Subject, obsTime, obsValue) %>%
spread(obsTime, obsValue) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("CHE"),
MEASURE == "AL",
FREQUENCY == "A",
obsTime %in% c("1994", "1999", "2009", "2019")) %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
select(SUBJECT, Subject, obsTime, obsValue) %>%
spread(obsTime, obsValue) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
MEASURE == "AL",
FREQUENCY == "A",
obsTime %in% c("1994", "1999", "2009", "2019")) %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
select(SUBJECT, Subject, obsTime, obsValue) %>%
spread(obsTime, obsValue) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("AUS"),
MEASURE == "AL",
FREQUENCY == "A",
obsTime %in% c("1994", "1999", "2009", "2019")) %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
select(SUBJECT, Subject, obsTime, obsValue) %>%
spread(obsTime, obsValue) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("USA"),
MEASURE == "AL",
FREQUENCY == "A",
obsTime %in% c("1994", "1999", "2009", "2019")) %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
select(SUBJECT, Subject, obsTime, obsValue) %>%
spread(obsTime, obsValue) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("ISR"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
group_by(SUBJECT, Subject) %>%
summarise(Nobs = n(),
min = min(obsTime),
max = max(obsTime)) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("CHE"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
group_by(SUBJECT, Subject) %>%
summarise(Nobs = n(),
min = min(obsTime),
max = max(obsTime)) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
group_by(SUBJECT, Subject) %>%
summarise(Nobs = n(),
min = min(obsTime),
max = max(obsTime)) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(LOCATION %in% c("USA"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$SUBJECT, by = "SUBJECT") %>%
group_by(SUBJECT, Subject) %>%
summarise(Nobs = n(),
min = min(obsTime),
max = max(obsTime)) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
PRICES_CPI %>%
filter(SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY",
obsTime == "2019-Q4") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
select(LOCATION, Location, SUBJECT, obsValue) %>%
mutate(obsValue = round(obsValue, 1)) %>%
spread(SUBJECT, obsValue) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Location)),
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 .}
PRICES_CPI %>%
filter(LOCATION %in% c("ISL"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value/100, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 5),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value/100, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 5),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1985-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1993-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("GBR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("GBR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1993-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("GBR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("2010-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2022, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("GBR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("2014-01-01"),
date <= as.Date("2030-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation (%)") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2022, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 0.5),
labels = percent_format(acc = .1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("CHE"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1970-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("USA"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1970-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1970-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("AUS"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "GY") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100),
date >= as.Date("1970-01-01")) %>%
mutate(rents_real = CP040100-CPALTT01) %>%
select(date, LOCATION, CPALTT01, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("Inflation") +
geom_line(aes(x = date, y = value/100, color = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = percent_format(acc = 1)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.9, 0.9),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISL"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISL"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2007-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(CP040100 = 100*CP040100/CP040100[date == as.Date("2007-01-01")],
CPALTT01 = 100*CPALTT01/CPALTT01[date == as.Date("2007-01-01")],
rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 20)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.2, 0.8),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01"),
date <= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.8, 0.8),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
filter(date >= as.Date("2010-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("GBR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("GBR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("ISR"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
filter(date >= as.Date("2010-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("CHE"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("CHE"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("CHE"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
month_to_date %>%
filter(date >= as.Date("2010-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2010-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("AUS"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1980-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("AUS"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("AUS"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2010-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(rents_real = 100*CP040100/CPALTT01) %>%
select(date, LOCATION, CPALTT01, rents_real, CP040100) %>%
gather(variable, value, - date, -LOCATION) %>%
mutate(Variable = case_when(variable == "rents_real" ~ "Real Rents",
variable == "CP040100" ~ "Rents",
variable == "CPALTT01" ~ "CPI")) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
ggplot(.) + theme_minimal() + xlab("") + ylab("CPI") +
geom_line(aes(x = date, y = value, color = Variable, linetype = Variable)) +
scale_x_date(breaks = seq(1960, 2100, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(obsValue = 100*CP040100/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("1990-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(obsValue = 100*CP040100/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
filter(date >= as.Date("2000-01-01")) %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(obsValue = 100*CP040100/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 1)) +
theme(legend.position = c(0.15, 0.5),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("KOR", "CAN", "PRT", "ESP"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(obsValue = 100*CP040100/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10)) +
theme(legend.position = c(0.7, 0.80),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("DNK", "AUS", "AUT", "BEL"),
SUBJECT %in% c("CP040100", "CPALTT01"),
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
select(SUBJECT, date, LOCATION, obsValue) %>%
spread(SUBJECT, obsValue) %>%
filter(!is.na(CP040100)) %>%
mutate(obsValue = 100*CP040100/CPALTT01) %>%
group_by(LOCATION) %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Real Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 5)) +
theme(legend.position = c(0.2, 0.80),
legend.title = element_blank())
PRICES_CPI_CPALTT01_IXOB <- PRICES_CPI %>%
filter(SUBJECT == "CPALTT01",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
select(LOCATION, Location, obsTime, CPALTT01_IXOB = obsValue)
save(PRICES_CPI_CPALTT01_IXOB, file = "PRICES_CPI_CPALTT01_IXOB_2.RData")
PRICES_CPI_CPALTT01_IXOB <- PRICES_CPI %>%
filter(SUBJECT == "CPALTT01",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
select(LOCATION, Location, date, CPALTT01_IXOB = obsValue)
save(PRICES_CPI_CPALTT01_IXOB, file = "PRICES_CPI_CPALTT01_IXOB.RData")
PRICES_CPI_CPALTT01_IXOB %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN")) %>%
left_join(colors, by = c("Location" = "country")) %>%
rename(obsValue = CPALTT01_IXOB) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags + theme_minimal() +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI_CPALTT01_IXOB %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
date >= as.Date("1990-01-01")) %>%
left_join(colors, by = c("Location" = "country")) %>%
rename(obsValue = CPALTT01_IXOB) %>%
group_by(Location) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags + theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI_CPALTT01_IXOB %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
date >= as.Date("1996-01-01")) %>%
left_join(colors, by = c("Location" = "country")) %>%
rename(obsValue = CPALTT01_IXOB) %>%
group_by(Location) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags + theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2025, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT == "CPGRLH01",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags + theme_minimal() +
theme_minimal() + xlab("") + ylab("Services less housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT == "CP010000",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags +
theme_minimal() + xlab("") + ylab("CPI, Food and non-Alcoholic beverages") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT == "CP030000",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags + theme_minimal() +
theme_minimal() + xlab("") + ylab("CPI, Clothing and Footware") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT == "CP110000",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags + theme_minimal() +
theme_minimal() + xlab("") + ylab("CPI, Restaurants and hotels") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "USA", "DEU", "JPN"),
SUBJECT == "CP040100",
FREQUENCY == "Q",
MEASURE == "IXOB") %>%
quarter_to_date %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
left_join(colors, by = c("Location" = "country")) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_4flags + theme_minimal() +
theme_minimal() + xlab("") + ylab("CPI, Actual rentals for housing") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 200, 10))
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
month_to_date %>%
filter(date >= as.Date("1990-01-01")) %>%
left_join(colors, by = c("Location" = "country")) %>%
group_by(Location) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags + theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2026, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI %>%
filter(LOCATION %in% c("FRA", "DEU"),
SUBJECT %in% c("CPALTT01"),
FREQUENCY == "M",
MEASURE == "IXOB") %>%
left_join(PRICES_CPI_var$LOCATION, by = "LOCATION") %>%
month_to_date %>%
filter(date >= as.Date("1996-01-01")) %>%
left_join(colors, by = c("Location" = "country")) %>%
group_by(Location) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags + theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2026, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI_CPALTT01_IXOB %>%
filter(LOCATION %in% c("FRA", "DEU"),
date >= as.Date("1990-01-01")) %>%
left_join(colors, by = c("Location" = "country")) %>%
rename(obsValue = CPALTT01_IXOB) %>%
group_by(Location) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags + theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())
PRICES_CPI_CPALTT01_IXOB %>%
filter(LOCATION %in% c("FRA", "DEU"),
date >= as.Date("1996-01-01")) %>%
left_join(colors, by = c("Location" = "country")) %>%
rename(obsValue = CPALTT01_IXOB) %>%
group_by(Location) %>%
mutate(obsValue = 100*obsValue/obsValue[1]) %>%
ggplot(.) + geom_line(aes(x = date, y = obsValue, color = color)) +
scale_color_identity() + add_2flags + theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2025, 2) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 400, 10)) +
theme(legend.position = c(0.7, 0.30),
legend.title = element_blank())