Regional gross domestic product (PPS per inhabitant) by NUTS 2 regions - tgs00005

Data - Eurostat

Structure

Map - Cross Section

2014

Code
tgs00005 |> 
  filter(time == 2014, 
         nchar(geo) == 4) |> 
  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, 2000, 10),
                       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 = "PPS GDP / person")

2015

Code
tgs00005 |> 
  filter(time == 2015, 
         nchar(geo) == 4) |> 
  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, 2000, 10),
                       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 = "PPS GDP / person")

2018

Code
tgs00005 |> 
  filter(time == 2018, 
         nchar(geo) == 4) |> 
  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, 2000, 10),
                       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 = "PPS GDP / person")

2019

Code
tgs00005 |> 
  filter(time == 2019, 
         nchar(geo) == 4) |> 
  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, 2000, 10),
                       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 = "PPS GDP / person")

Change 2012-2022

Code
tgs00005 |>
  filter(time %in% c("2012", "2022"),
         nchar(geo) == 4) |>
  select(-unit) |>
  left_join(geo, by = "geo") |>
  spread(time, values) |>
  right_join(europe_NUTS2, by = "geo") |>
  filter(long >= -15, lat >= 33) |>
  ggplot(aes(x = long, y = lat, group = group, fill = `2022`/`2012`-1)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(-100, 100, 10)) +
  theme_void() + theme(legend.position = c(0.25, 0.85)) +
  labs(fill = "% Growth 2012-22 \n PPS GDP / person")

Change 2015-2019

Code
tgs00005 |> 
  filter(time %in% c("2015", "2019"), 
         nchar(geo) == 4) |>
  select(-unit) |>
  left_join(geo, by = "geo") |>
  spread(time, values) |>
  right_join(europe_NUTS2, by = "geo") |>
  filter(long >= -15, lat >= 33) |>
  ggplot(aes(x = long, y = lat, group = group, fill = `2019`/`2015`-1)) +
  geom_polygon() + coord_map() +
  scale_fill_viridis_c(na.value = "white",
                       labels = scales::percent_format(accuracy = 1),
                       breaks = 0.01*seq(-100, 100, 10)) +
  theme_void() + theme(legend.position = c(0.25, 0.85)) + 
  labs(fill = "% Growth 2015-19 \n PPS GDP / person")

Tables: 2012, 2018, 2023, Growth

Code
tgs00005 |>
  filter(time %in% c("2012", "2018", "2023")) |>
  select(-unit) |>
  left_join(geo, by = "geo") |>
  spread(time, values) |>
  mutate(`2012-23` = round(100*(`2023`/`2012`-1), 1)) |>
  mutate(`2018-23` = round(100*(`2023`/`2018`-1), 1)) |>
  arrange(-`2012-23`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Tables: # Of observations

Code
tgs00005 |>
  select(-unit) |>
  left_join(geo, by = "geo") |>
  mutate(time = as.numeric(time)) |>
  group_by(geo, Geo) |>
  summarise(MinYear = min(time),
            MaxYear = max(time),
            Nobs = n()) |>
  arrange(Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}