Code
tibble(DOWNLOAD_TIME = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/tipsau10.RData")$mtime)) %>%
print_table_conditional()
DOWNLOAD_TIME |
---|
2024-10-08 |
Data - Eurostat
tibble(DOWNLOAD_TIME = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/tipsau10.RData")$mtime)) %>%
print_table_conditional()
DOWNLOAD_TIME |
---|
2024-10-08 |
%>%
tipsau10 group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()
time | Nobs |
---|---|
2023 | 87 |
%>%
tipsau10 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 .} {
<- geo %>%
geo mutate(eurozone = ifelse(Geo %in% c("Austria", "Belgium", "Cyprus", "Estonia", "Finland", "France",
"Germany", "Greece", "Ireland", "Italy", "Latvia", "Lithuania",
"Luxembourg", "Malta", "Netherlands", "Portugal", "Slovakia",
"Slovenia", "Spain"), T, F),
non_eurozone = ifelse(Geo %in% c("Bulgaria", "Croatia", "Czechia", "Denmark",
"Hungary", "Poland", "Romania", "Sweden"), T, F))
%>%
tipsau10 left_join(geo, by = "geo") %>%
filter(eurozone) %>%
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 .} {
%>%
tipsau10 left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
unit | Unit | Nobs |
---|---|---|
CP_MNAC | Current prices, million units of national currency | 841 |
CLV15_MNAC | Chain linked volumes (2015), million units of national currency | 836 |
CLV_PCH_PRE | Chain linked volumes, percentage change on previous period | 812 |
%>%
tipsau10 group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
arrange(desc(time)) %>%
print_table_conditional()
time | Nobs |
---|---|
2023 | 87 |
2022 | 87 |
2021 | 87 |
2020 | 87 |
2019 | 87 |
2018 | 87 |
2017 | 87 |
2016 | 87 |
2015 | 87 |
2014 | 87 |
2013 | 87 |
2012 | 87 |
2011 | 87 |
2010 | 87 |
2009 | 87 |
2008 | 87 |
2007 | 87 |
2006 | 87 |
2005 | 87 |
2004 | 87 |
2003 | 87 |
2002 | 87 |
2001 | 87 |
2000 | 86 |
1999 | 85 |
1998 | 85 |
1997 | 85 |
1996 | 85 |
1995 | 62 |
%>%
tipsau10 filter(geo %in% c("DE", "ES", "FR", "IT", "NL"),
== "CLV_PCH_PRE") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
ggplot scale_color_identity() + add_5flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
labels = date_format("%y")) +
xlab("") + ylab("GDP growth") +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = scales::percent_format(accuracy = 1))
%>%
tipsau10 filter(geo %in% c("FR", "DE", "PT", "ES", "IT"),
== "CLV_PCH_PRE") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
ggplot scale_color_identity() + add_5flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
labels = date_format("%y")) +
xlab("") + ylab("GDP growth") +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = scales::percent_format(accuracy = 1))
%>%
tipsau10 filter(geo %in% c("FR", "DE", "PT"),
== "CLV_PCH_PRE") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
ggplot scale_color_identity() + add_3flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
labels = date_format("%y")) +
xlab("") + ylab("GDP growth") +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = scales::percent_format(accuracy = 1))
%>%
tipsau10 filter(geo %in% c("PL", "HU", "SI"),
== "CLV_PCH_PRE") %>%
unit %>%
year_to_date left_join(geo, by = "geo") %>%
left_join(colors, by = c("Geo" = "country")) %>%
mutate(values = values/100) %>%
+ geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
ggplot scale_color_identity() + add_3flags +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
labels = date_format("%y")) +
xlab("") + ylab("GDP growth") +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 2),
labels = scales::percent_format(accuracy = 1))
%>%
tipsau10 %>%
year_to_date left_join(geo, by = "geo") %>%
filter(unit == "CLV_PCH_PRE") %>%
if (eurozone) filter(., eurozone) else .} %>%
{group_by(date) %>%
filter(n() == 19) %>%
summarise(`Moyenne` = mean(values),
`Ecart Type` = sd(values)) %>%
transmute(date, `Moyenne`,
`Moyenne + SD` = `Moyenne` + `Ecart Type`,
`Moyenne - SD` = `Moyenne` - `Ecart Type`) %>%
gather(variable, value, -date) %>%
mutate(value = value/100) %>%
+ geom_line(aes(x = date, y = value, color = variable, linetype = variable)) +
ggplot theme_minimal() + xlab("") + ylab("") +
scale_color_manual(values = c(viridis(3)[1], viridis(3)[2], viridis(3)[2])) +
scale_linetype_manual(values = c("solid", "dashed", "dashed")) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 2), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.25, 0.9),
legend.title = element_blank())
%>%
tipsau10 %>%
year_to_date left_join(geo, by = "geo") %>%
filter(unit == "CLV_PCH_PRE") %>%
if (eurozone) filter(., eurozone) else .} %>%
{group_by(date) %>%
filter(n() == 19) %>%
summarise(`Moyenne` = mean(values),
`Ecart Type` = sd(values)) %>%
transmute(date, `Moyenne`,
`Moyenne + SD` = `Moyenne` + `Ecart Type`,
`Moyenne - SD` = `Moyenne` - `Ecart Type`) %>%
gather(variable, value, -date) %>%
mutate(value = value/100) %>%
+ geom_line(aes(x = date, y = value, color = variable, linetype = variable)) +
ggplot theme_minimal() + xlab("") + ylab("") +
scale_color_manual(values = c("#003399", "#FFCC00", "#FFCC00")) +
scale_linetype_manual(values = c("solid", "dashed", "dashed")) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2022, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.25, 0.9),
legend.title = element_blank())
%>%
tipsau10 %>%
year_to_date left_join(geo, by = "geo") %>%
filter(unit == "CLV_PCH_PRE") %>%
if (eurozone) filter(., eurozone) else .} %>%
{group_by(date) %>%
filter(n() == 19) %>%
summarise(`Moyenne Europe` = mean(values),
`Ecart Type` = sd(values),
`France` = values[geo == "FR"]) %>%
transmute(date, `Moyenne Europe`,
`Moyenne Europe + SD` = `Moyenne Europe` + `Ecart Type`,
`Moyenne Europe - SD` = `Moyenne Europe` - `Ecart Type`,
`France`) %>%
gather(variable, value, -date) %>%
mutate(values = value/100,
Geo = ifelse(variable == "France", "France", "Europe")) %>%
+ geom_line(aes(x = date, y = values, color = variable, linetype = variable)) +
ggplot theme_minimal() + xlab("") + ylab("") + add_4flags +
scale_color_manual(values = c("#ED2939", "#003399", "#FFCC00", "#FFCC00")) +
scale_linetype_manual(values = c("solid", "solid", "dashed", "dashed")) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.75, 0.2),
legend.title = element_blank())
%>%
tipsau10 %>%
year_to_date left_join(geo, by = "geo") %>%
filter(unit == "CLV_PCH_PRE") %>%
if (eurozone) filter(., eurozone) else .} %>%
{group_by(date) %>%
filter(n() == 19) %>%
summarise(`Moyenne Europe` = mean(values),
`Ecart Type` = sd(values),
`France` = values[geo == "FR"],
`Allemagne` = values[geo == "DE"]) %>%
transmute(date, `Moyenne Europe`,
`Moyenne Europe + SD` = `Moyenne Europe` + `Ecart Type`,
`Moyenne Europe - SD` = `Moyenne Europe` - `Ecart Type`,
`France`,
`Allemagne`) %>%
gather(variable, value, -date) %>%
mutate(values = value/100,
Geo = ifelse(variable == "France", "France", "Europe"),
Geo = ifelse(variable == "Allemagne", "Germany", Geo)) %>%
+ geom_line(aes(x = date, y = values, color = variable, linetype = variable)) +
ggplot theme_minimal() + xlab("") + ylab("") + add_5flags +
scale_color_manual(values = c("#000000", "#ED2939", "#003399", "#FFCC00", "#FFCC00")) +
scale_linetype_manual(values = c("solid", "solid", "solid", "dashed", "dashed")) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 200, 1),
labels = scales::percent_format(accuracy = 1)) +
theme(legend.position = c(0.75, 0.2),
legend.title = element_blank()) +
geom_hline(yintercept = 0.06, linetype = "dotted") +
geom_hline(yintercept = -0.04, linetype = "dotted")