Code
%>%
ert_bil_eur_a left_join(currency, by = "currency") %>%
group_by(currency, Currency) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
Data - Eurostat
%>%
ert_bil_eur_a left_join(currency, by = "currency") %>%
group_by(currency, Currency) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
ert_bil_eur_a left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
unit | Unit | Nobs |
---|---|---|
NAC | National currency | 7733 |
%>%
ert_bil_eur_a left_join(statinfo, by = "statinfo") %>%
group_by(statinfo, Statinfo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
statinfo | Statinfo | Nobs |
---|---|---|
AVG | Average | 3885 |
END | Value at the end of the period | 3848 |
%>%
ert_bil_eur_a group_by(time) %>%
summarise(Nobs = n()) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
ert_bil_eur_a filter(statinfo == "END",
%in% c("2019", "2009", "1999", "1989")) %>%
time left_join(currency, by = "currency") %>%
select(-statinfo, -unit) %>%
spread(time, values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
ert_bil_eur_a filter(statinfo == "END",
%in% c("GBP", "CHF", "USD", "CAD")) %>%
currency %>%
time_to_date left_join(currency, by = "currency") %>%
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = values, color = Currency, linetype = Currency) +
scale_color_manual(values = viridis(5)[1:4]) +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
theme(legend.position = c(0.85, 0.85),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(0, 9, 0.2)) +
ylab("Exchange Rate") + xlab("")
%>%
ert_bil_eur_a filter(statinfo == "END",
%in% c("PLN", "SGD", "AUD", "NZD")) %>%
currency %>%
time_to_date left_join(currency, by = "currency") %>%
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = values, color = Currency, linetype = Currency) +
scale_color_manual(values = viridis(5)[1:4]) +
scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
theme(legend.position = c(0.15, 0.85),
legend.title = element_blank()) +
scale_y_continuous(breaks = seq(0, 9, 0.2)) +
ylab("Exchange Rate") + xlab("")
%>%
ert_bil_eur_a filter(statinfo == "END",
%in% c("PLN", "HUF")) %>%
currency %>%
time_to_date left_join(currency, by = "currency") %>%
ggplot() + geom_line() + theme_minimal() +
aes(x = date, y = values, color = Currency, linetype = Currency) +
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("")