demo_r_d3dens %>%
filter(nchar(geo) == 5,
time == "2018") %>%
select(geo, values) %>%
left_join(geo, by = "geo") %>%
right_join(europe_NUTS3, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
breaks = c(1, 4, 10, 40, 100, 400, 1000, 4000, 8000),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1),
trans = scales::pseudo_log_trans(sigma = 0.001)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Density")