From d5c830793a3b43ca33c3584ab7fb21c30907845d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20G=C3=B6bel?= Date: Mon, 21 Jun 2021 17:36:21 +0200 Subject: [PATCH] update code --- code/01-data.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/01-data.R b/code/01-data.R index 45f14ba..6f38da7 100644 --- a/code/01-data.R +++ b/code/01-data.R @@ -291,6 +291,11 @@ uk_postcode_polygons <- sf::st_read("data/postcode_areas/Sectors.shp") %>% es_postcode_polygons <- es_postcode_polygons %>% sf::st_crop(es_cntr_polygon) +# combine postcode polygons (where required) -------------------------------------------- +es_postcode_polygons <- es_postcode_polygons %>% + group_by(COD_POSTAL) %>% + summarise(geometry = st_union(geometry)) + # save postcode polygons ---------------------------------------------------------------- sf::write_sf(ch_postcode_polygons, "./data/postcode_areas/ch_postcode_polygons.shp") sf::write_sf(de_postcode_polygons, "./data/postcode_areas/de_postcode_polygons.shp")