source | dataset | .html | .RData |
---|---|---|---|
eurostat | demo_fmonth | 2024-05-25 | 2024-06-07 |
demo_fmonth %>%
mutate(time = paste0(time, month)) %>%
month_to_date %>%
filter(date >= as.Date("1980-01-01"),
geo %in% c("EA19", "EL", "FR")) %>%
left_join(geo, by = "geo") %>%
mutate(Geo = ifelse(geo == "EA19", "Europe", Geo)) %>%
left_join(colors, by = c("Geo" = "country")) %>%
ggplot + geom_line(aes(x = date, y = values, color = color)) +
scale_color_identity() + add_3flags +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1910, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous() +
theme(legend.position = c(0.2, 0.2),
legend.title = element_blank())
demo_fmonth %>%
mutate(time = paste0(time, month)) %>%
month_to_date %>%
filter(date >= as.Date("1980-01-01"),
geo %in% c("DE", "FR", "IT", "FX")) %>%
ggplot + geom_line(aes(x = date, y = values, color = geo)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1910, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous() +
theme(legend.position = c(0.2, 0.2),
legend.title = element_blank())
demo_fmonth %>%
mutate(time = paste0(time, month)) %>%
month_to_date %>%
filter(date >= as.Date("1980-01-01"),
geo %in% c("DE", "FR", "IT")) %>%
group_by(geo) %>%
arrange(date) %>%
mutate(values = zoo::rollsum(x = values, 12, align = "right", fill = NA)) %>%
left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
ggplot + geom_line(aes(x = date, y = values, color = color)) +
scale_color_identity() + add_3flags +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1910, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous() +
theme(legend.position = c(0.2, 0.2),
legend.title = element_blank())
demo_fmonth %>%
mutate(time = paste0(time, month)) %>%
month_to_date %>%
filter(date >= as.Date("1990-01-01"),
geo %in% c("DE", "FR", "IT")) %>%
left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
ggplot + geom_line(aes(x = date, y = values, color = color)) +
scale_color_identity() + add_3flags +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1910, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous() +
theme(legend.position = c(0.2, 0.2),
legend.title = element_blank())
demo_fmonth %>%
mutate(time = paste0(time, month)) %>%
month_to_date %>%
filter(date >= as.Date("1995-01-01"),
geo %in% c("DE", "FR", "IT")) %>%
left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
ggplot + geom_line(aes(x = date, y = values, color = color)) +
scale_color_identity() + add_3flags +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1910, 2100, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%Y")) +
scale_y_continuous() +
theme(legend.position = c(0.2, 0.2),
legend.title = element_blank())