Areas of multiple deprivation without nearby greenspace

By comparing Greenspace Hack data against other datasets, we can analyse people's proximity to greenspaces, and identify potential needs for new sites. In this example, we'll compare our data against the Index of Multiple Deprivation 2015 (IMD).

IMD is mapped to Census LSOAs (Lower Layer Super Output Areas), which are areas of broadly equal population (1000-1500). Our methodology will be to take each LSOA in Oxfordshire in turn; filter to obtain only those which have over 20% of households with multiple deprivation; and then identify those which don't have a greenspace site within 1km.

We'll use the Turf geospatial analysis library to aid our calculations.

Caveat: The results are, of course, dependent on the completeness of our survey. There are significantly deprived LSOAs in Chipping Norton and Arncott, for example. Since we did not survey greenspace in either area, our query will not find greenspace within 1km of these LSOAs. That doesn't mean there is no greenspace - only that we haven't surveyed it.

  • First, we fetch the greenspace data into 'greenspaces', and our augmented LSOA data (containing IMD scores) into 'lsoas'. (We use the async-get-json module to do this.)
  • We create a new array, 'deprived'.
  • We iterate through every feature in 'lsoas'. If its IMD "multiple deprivation" percentage is less than 20%, we skip it.
  • If it's 20% or more, we look for the nearest greenspace, using Turf's 'nearestPoint' function.
  • If that greenspace is 1km away or more, we add it to 'deprived'.
  • Once our loop has finished, we make sure 'deprived' is the final value in the script, so that RunKit will show it on a map.

Click "run" to see the result (you'll need to wait a few seconds for it to show).

var turf = require("@turf/turf"); var getJSON = require("async-get-json"); var greenspaces = await getJSON("https://greenspacehack.com/data/sites_grouped.geojson"); var lsoas = await getJSON("https://greenspacehack.com/data/oxfordshire_lsoas.geojson"); // Find the most deprived LSOAs with no greenspace within 1km var deprived = []; turf.featureEach(lsoas, function(feature,index) { if (feature.properties.multiple<20) return; var nearestGreenspace = turf.nearestPoint(feature, greenspaces); if (turf.distance(feature,nearestGreenspace)>=1) deprived.push(feature); }); // Show on a map deprived;

You can see this on RunKit.