prc_hpi_hsnq %>%
left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}
unit | Unit | Nobs |
---|---|---|
RCH_Q | Quarterly rate of change | 1943 |
PC_Y | Percentage in the year | 1904 |
INX_Q | Quarterly index | 1823 |
RCH_A | Annual rate of change | 1805 |
prc_hpi_hsnq %>%
left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
select(Flag, everything()) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}
prc_hpi_hsnq %>%
filter(geo %in% c("FR", "IT", "DE"),
unit == "INX_Q") %>%
quarter_to_date %>%
left_join(geo, by = "geo") %>%
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = values, color = Geo, linetype = Geo) +
scale_color_manual(values = viridis(4)[1:3]) +
scale_x_date(breaks = seq(1920, 2025, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
theme(legend.position = c(0.35, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(-100, 300, 10)) +
ylab("House Price Index") + xlab("")
prc_hpi_hsnq %>%
filter(geo %in% c("BE", "DK", "FI"),
unit == "INX_Q") %>%
quarter_to_date %>%
left_join(geo, by = "geo") %>%
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = values, color = Geo, linetype = Geo) +
scale_color_manual(values = viridis(4)[1:3]) +
scale_x_date(breaks = seq(1920, 2025, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
theme(legend.position = c(0.35, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(-100, 300, 10)) +
ylab("House Price Index") + xlab("")
prc_hpi_hsnq %>%
filter(geo %in% c("FR")) %>%
quarter_to_date %>%
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = values, color = unit, linetype = unit) +
scale_color_manual(values = viridis(5)[1:4]) +
scale_x_date(breaks = seq(1920, 2025, 1) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
theme(legend.position = c(0.35, 0.9),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(-100, 300, 10)) +
ylab("House Price Index") + xlab("")