Skip to content

Commit 7694c81

Browse files
committed
Now using the boundary of Trafford with a 1km buffer as the shapefile to obtain the flood risk data from the Environment Agency as this is a more reproducible method than hand-drawing the polygon. Additionally it allows the buffer to be altered very easily and programmatically. All flood risk data has been refreshed as the 1km buffer covers a slightly larger area than the previous polygon.
1 parent acad939 commit 7694c81

15 files changed

Lines changed: 2863 additions & 2173 deletions

flood_risk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</tr>
5454
<tr>
5555
<td>Last updated</td>
56-
<td>2025-01-28</td>
56+
<td>2025-02-21</td>
5757
</tr>
5858
<tr>
5959
<td>Notes</td>

flood_risk/pre-processing.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# NOTE: previous dataset now retired: https://www.data.gov.uk/dataset/bad20199-6d39-4aad-8564-26a46778fd94/risk-of-flooding-from-rivers-and-sea
66
# Licence: Open Government Licence 3.0
77
# Attribution: (C) Environment Agency copyright and/or database right 2025. All rights reserved.
8-
# Last Updated: 2025-01-28
8+
# Last Updated: 2025-02-20
99
# Update frequency: Quarterly
1010
# The dataset is downloaded from https://environment.data.gov.uk/explore/96ab4342-82c1-4095-87f1-0082e8d84ef1?download=true by uploading a bounding polygon around Trafford. This file is large ~40MB.
1111

@@ -21,8 +21,9 @@ library(tidyverse) ; library(sf)
2121
#sf_use_s2(FALSE) # Set sf to use R2 calculations as we get errors using S2
2222

2323

24-
# Convert the boundary of Trafford and its immediate environs (created in Plotter) from GeoJSON into a ShapeFile ---------------------------
25-
read_sf("trafford_and_environs_boundary.geojson") %>%
24+
# Convert the boundary of Trafford with a 1km buffer from GeoJSON into a ShapeFile ---------------------------
25+
read_sf("http://trafforddatalab.io/spatial_data/local_authority/2021/trafford_local_authority_full_resolution.geojson") %>%
26+
st_buffer(1000) %>%
2627
# This creates 4 files with the extensions .dbf, .prj, .shp and .shx
2728
write_sf("trafford_and_environs_boundary.shp", driver = "ESRI Shapefile")
2829

flood_risk/trafford_and_environs_boundary.geojson

Lines changed: 0 additions & 163 deletions
This file was deleted.

flood_risk/trafford_flood_risk.geojson

Lines changed: 966 additions & 778 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)