Code
tibble(LAST_DOWNLOAD = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/nama_10r_3gdp.RData")$mtime)) %>%
print_table_conditional()
LAST_DOWNLOAD |
---|
2024-10-08 |
Data - Eurostat
tibble(LAST_DOWNLOAD = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/nama_10r_3gdp.RData")$mtime)) %>%
print_table_conditional()
LAST_DOWNLOAD |
---|
2024-10-08 |
LAST_COMPILE |
---|
2024-11-05 |
%>%
nama_10r_3gdp group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()
time | Nobs |
---|---|
2022 | 4566 |
%>%
nama_10r_3gdp left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
print_table_conditional()
unit | Unit | Nobs |
---|---|---|
MIO_EUR | Million euro | 39154 |
MIO_NAC | Million units of national currency | 39154 |
MIO_PPS_EU27_2020 | Million purchasing power standards (PPS, EU27 from 2020) | 39154 |
EUR_HAB | Euro per inhabitant | 37758 |
EUR_HAB_EU27_2020 | Euro per inhabitant in percentage of the EU27 (from 2020) average | 37758 |
PPS_EU27_2020_HAB | Purchasing power standard (PPS, EU27 from 2020), per inhabitant | 37758 |
PPS_HAB_EU27_2020 | Purchasing power standard (PPS, EU27 from 2020), per inhabitant in percentage of the EU27 (from 2020) average | 37758 |
%>%
nama_10r_3gdp 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 .} {
%>%
nama_10r_3gdp group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
print_table_conditional()
time | Nobs |
---|---|
2022 | 4566 |
2021 | 12313 |
2020 | 12313 |
2019 | 12453 |
2018 | 12446 |
2017 | 12439 |
2016 | 12439 |
2015 | 12439 |
2014 | 12453 |
2013 | 12313 |
2012 | 12313 |
2011 | 12313 |
2010 | 12313 |
2009 | 12313 |
2008 | 12313 |
2007 | 11941 |
2006 | 11941 |
2005 | 11913 |
2004 | 11913 |
2003 | 11073 |
2002 | 10658 |
2001 | 10658 |
2000 | 10658 |
%>%
nama_10r_3gdp filter(time == "2017",
%in% c("EUR_HAB", "PPS_EU27_2020_HAB")) %>%
unit select(geo, unit, values) %>%
left_join(geo, by = "geo") %>%
spread(unit, values) %>%
arrange(-`EUR_HAB`) %>%
print_table_conditional()
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 2,
== "EUR_HAB") %>%
unit right_join(europe_NUTS0, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(0, 200, 10),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 3,
== "EUR_HAB") %>%
unit right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(0, 200, 10),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 3,
== "PPS_EU27_2020_HAB") %>%
unit right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(0, 200, 10),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 4,
== "EUR_HAB") %>%
unit right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(0, 200, 20),
values = c(0, 0.05, 0.1, 0.15, 0.2, 0.25, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 4,
== "PPS_EU27_2020_HAB") %>%
unit right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(0, 200, 20),
values = c(0, 0.05, 0.1, 0.15, 0.2, 0.25, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 5,
== "EUR_HAB") %>%
unit right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(0, 600, 50),
values = c(0, 0.02, 0.04, 0.06, 0.08, 0.1, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")
%>%
nama_10r_3gdp filter(time == "2019",
nchar(geo) == 5,
== "EUR_HAB") %>%
unit right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(10, 250, 30),
values = c(0, 0.1, 0.15, 0.2, 0.25, 0.3,0.35, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "PIB / habitant, 2019\n(milliers €)\n")
%>%
nama_10r_3gdp filter(time == "2018",
nchar(geo) == 5,
== "EUR_HAB") %>%
unit right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = seq(10, 250, 30),
values = c(0, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "PIB / habitant\n(milliers €)\n")
%>%
nama_10r_3gdp filter(time == "2016",
nchar(geo) == 5,
== "EUR_HAB") %>%
unit right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 1000),
trans = scales::pseudo_log_trans(sigma = 0.001)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "€ / inhabitant")