Code
tibble(LAST_DOWNLOAD = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/nama_10r_3gva.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_3gva.RData")$mtime)) %>%
print_table_conditional()
LAST_DOWNLOAD |
---|
2024-10-08 |
LAST_COMPILE |
---|
2024-11-23 |
%>%
nama_10r_3gva group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(desc(time)) %>%
head(1) %>%
print_table_conditional()
time | Nobs |
---|---|
2022 | 11851 |
%>%
nama_10r_3gva left_join(currency, by = "currency") %>%
group_by(currency, Currency) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
currency | Currency | Nobs |
---|---|---|
MIO_NAC | Million units of national currency | 493770 |
MIO_EUR | Million euro | 493769 |
%>%
nama_10r_3gva left_join(nace_r2, by = "nace_r2") %>%
group_by(nace_r2, Nace_r2) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva group_by(time) %>%
summarise(Nobs = n()) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
%in% c("FR10", "FRF1", "FRF2", "FRF3"),
geo == "MIO_EUR") %>%
currency left_join(geo, by = "geo") %>%
left_join(nace_r2, by = "nace_r2") %>%
select(Geo, nace_r2, Nace_r2, values) %>%
group_by(Geo) %>%
mutate(values = round(100*values / values[nace_r2 == "TOTAL"], 1)) %>%
spread(Geo, values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
%in% c("FRB0", "FRC1", "FRC2", "FRD1"),
geo == "MIO_EUR") %>%
currency left_join(geo, by = "geo") %>%
left_join(nace_r2, by = "nace_r2") %>%
select(Geo, nace_r2, Nace_r2, values) %>%
group_by(Geo) %>%
mutate(values = round(100*values / values[nace_r2 == "TOTAL"], 1)) %>%
spread(Geo, values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 4,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 left_join(geo, by = "geo") %>%
select(geo, Geo, value_added = values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 5,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 left_join(geo, by = "geo") %>%
select(geo, Geo, value_added = values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 3,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 left_join(geo, by = "geo") %>%
select(geo, Geo, value_added = values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 4,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 4,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values), by = "geo") %>%
mutate(emp_person = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, emp_person) %>%
%>%
na.omit if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 5,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 5,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values), by = "geo") %>%
mutate(emp_person = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, emp_person) %>%
%>%
na.omit if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 3,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 3,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values), by = "geo") %>%
mutate(emp_person = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, emp_person) %>%
arrange(-emp_person) %>%
%>%
na.omit if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 4,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 4,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -30, lat >= 25) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 10), 100, 200),
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 = "Income")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 4,
== "MIO_EUR",
currency == "C") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 4,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 5), 100, 200),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1),
direction = -1) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Manuf / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 5,
== "MIO_EUR",
currency == "C") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 5,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
filter(!is.na(value)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 5), 100, 200),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1),
direction = -1) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Manuf / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 3,
== "MIO_EUR",
currency == "C") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 3,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 5), 100, 200),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1),
direction = -1) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Manuf / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 2,
== "MIO_EUR",
currency == "C") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 2,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS0, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 5), 100, 200),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1),
direction = -1) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Manuf / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 4,
== "MIO_EUR",
currency == "A") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 4,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 1), 100, 200),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1),
direction = -1) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Agr. Value Added / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 5,
== "MIO_EUR",
currency == "A") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 5,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 1), 100, 200),
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 = "Agr. Value Added / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 3,
== "MIO_EUR",
currency == "A") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 3,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 1), 100, 200),
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 = "Agr. Value Added / Person")
%>%
nama_10r_3gva filter(time == "2015",
nchar(geo) == 2,
== "MIO_EUR",
currency == "A") %>%
nace_r2 select(geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(time == "2015",
nchar(geo) == 2,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(geo, employment = values),
by = "geo") %>%
mutate(value = round(1000*value_added / employment)) %>%
left_join(geo, by = "geo") %>%
select(geo, Geo, value) %>%
right_join(europe_NUTS0, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 1), 100, 200),
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 = "Manuf / Person")
options(gganimate.nframes = 50, gganimate.end_pause = 10)
%>%
nama_10r_3gva filter(nchar(geo) == 4,
== "MIO_EUR",
currency == "A") %>%
nace_r2 select(time, geo, value_added = values) %>%
full_join(nama_10r_3empers %>%
filter(nchar(geo) == 4,
== "EMP",
wstatus == "TOTAL") %>%
nace_r2 select(time, geo, employment = values),
by = c("geo", "time")) %>%
mutate(value = round(1000*value_added / employment),
year = as.integer(time)) %>%
left_join(geo, by = "geo") %>%
select(year, geo, Geo, value) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = " k€"),
breaks = c(seq(0, 80, 1), 100, 200),
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 = "Agr. Value Added / Person") +
transition_time(year) +
labs(title = "Year: {frame_time}")
%>%
nama_10r_3gva filter(nchar(geo) == 5,
== "MIO_EUR",
currency == "C") %>%
nace_r2 select(time, geo, value_added_manuf = values) %>%
full_join(nama_10r_3gva %>%
filter(nchar(geo) == 5,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 select(time, geo, value_added_total = values),
by = c("geo", "time")) %>%
mutate(value = value_added_manuf / value_added_total,
year = as.integer(time)) %>%
left_join(geo, by = "geo") %>%
select(year, geo, Geo, value) %>%
left_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = percent_format(accuracy = 1),
breaks = 0.01*seq(0, 90, 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 = "Manuf Share") +
transition_time(year) +
labs(title = "Year: {frame_time}")
options(gganimate.nframes = 50, gganimate.end_pause = 10)
%>%
nama_10r_3gva filter(nchar(geo) == 4,
== "MIO_EUR",
currency == "A") %>%
nace_r2 select(time, geo, value_added_manuf = values) %>%
full_join(nama_10r_3gva %>%
filter(nchar(geo) == 4,
== "MIO_EUR",
currency == "TOTAL") %>%
nace_r2 select(time, geo, value_added_total = values),
by = c("geo", "time")) %>%
mutate(value = value_added_manuf / value_added_total,
year = as.integer(time)) %>%
left_join(geo, by = "geo") %>%
select(year, geo, Geo, value) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -15, lat >= 33, value <= 80000) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = value/1000)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = percent_format(accuracy = 1),
breaks = 0.01*seq(0, 90, 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 = "Manuf Share") +
transition_time(year) +
labs(title = "Year: {frame_time}")