This project analyses tree cover and income deprivation data for Lower Layer Super Output Areas (LSOAs) in England.
- LSOAs England and Wales - Converted to WGS84
- Tree cover data
- Buildings data - Converted to WGS84
The data processing is done using Python scripts located in the scripts
directory:
merge.py
: Merges the tree cover and income deprivation data based on LSOA codes.process.py
: Combines the merged data with the LSOAs GeoJSON file, updating the GeoJSON features with tree cover and income rank properties.intersect.py
: Filters the updated LSOAs GeoJSON file and intersects it with the buildings data to create a new GeoJSON file with intersected buildings.
The following commands are used to generate vector tiles from the GeoJSON files:
Splits the large buildings file
python scripts/split.py
Simplifies the large buildings files
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part01.geojson -simplify 10% keep-shapes -o output/split/simplified_part01.geojson
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part02.geojson -simplify 10% keep-shapes -o output/split/simplified_part02.geojson
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part03.geojson -simplify 10% keep-shapes -o output/split/simplified_part03.geojson
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part04.geojson -simplify 10% keep-shapes -o output/split/simplified_part04.geojson
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part05.geojson -simplify 10% keep-shapes -o output/split/simplified_part05.geojson
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part06.geojson -simplify 10% keep-shapes -o output/split/simplified_part06.geojson
node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part07.geojson -simplify 10% keep-shapes -o output/split/simplified_part07.geojson
Combines the large building files
python scripts/combine.py
tippecanoe --output=output/filtered-LSOA.pmtiles \
--layer="filteredLSOA" \
--no-feature-limit \
--no-tile-size-limit \
--detect-shared-borders \
--coalesce-fraction-as-needed \
--coalesce-densest-as-needed \
--coalesce-smallest-as-needed \
--increase-gamma-as-needed \
--coalesce \
--reorder \
--minimum-zoom=0 \
--maximum-zoom=17 \
--force \
--simplification=20 \
output/filtered_LSOA.geojson
tippecanoe --output=output/tree-buildings.pmtiles \
--layer="treeBuildings" \
--no-feature-limit \
--no-tile-size-limit \
--detect-shared-borders \
--coalesce-fraction-as-needed \
--coalesce-densest-as-needed \
--coalesce-smallest-as-needed \
--increase-gamma-as-needed \
--coalesce \
--reorder \
--minimum-zoom=0 \
--maximum-zoom=17 \
--force \
--simplification=20 \
output/simplified_buildings.geojson