%>%
dallas_fed left_join(variable, by = "variable") %>%
group_by(variable, Variable) %>%
summarise(Nobs = n()) %>%
print_table_conditional
variable | Variable | Nobs |
---|---|---|
HPI | House Prices (Dallas Fed) | 5022 |
PDI | Price / Dividend Ratio | 5022 |
RHPI | Real House Prices (Dallas Fed) | 5022 |
RPDI | Real Price / Dividend Ratio | 5022 |
%>%
dallas_fed group_by(countryname) %>%
summarise(Nobs = n()) %>%
mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", countryname))),
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 .} {
%>%
dallas_fed group_by(date) %>%
summarise(Nobs = n()) %>%
arrange(desc(date)) %>%
print_table_conditional
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States"),
== "HPI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real House Prices") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States", "Japan"),
== "HPI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real House Prices") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_4flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("United States", "France"),
== "RHPI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
group_by(countryname) %>%
mutate(value = 100*value/value[date == as.Date("1997-01-01")]) %>%
mutate(color = ifelse(countryname == "United States", color2, color)) %>%
+ theme_minimal() + xlab("") + ylab("Real House Prices (1997 = 100)") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_2flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Japan", "Korea", "Switzerland"),
== "RHPI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real House Prices") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States"),
== "RHPI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real House Prices") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_3flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States", "Japan"),
== "RHPI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real House Prices") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_4flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States", "Japan"),
== "RPDI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real Price / Dividends Ratio") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_4flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States", "Japan"),
== "RPDI",
variable >= as.Date("1990-01-01")) %>%
date left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real Price / Dividends Ratio") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_4flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())
%>%
dallas_fed filter(countryname %in% c("Italy", "France", "United States", "Japan"),
== "PDI") %>%
variable left_join(colors, by = c("countryname" = "country")) %>%
+ theme_minimal() + xlab("") + ylab("Real Price / Dividends Ratio") +
ggplot geom_line(aes(x = date, y = value, color = color)) +
scale_color_identity() + add_4flags +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_log10(breaks = c(seq(0, 500, 10), seq(10, 50, 10))) +
theme(legend.position = c(0.25, 0.8),
legend.title = element_blank())