Compare Greenspace Hack data against LSOAs

node v9.11.2
version: master
This demonstrates using Turf to compare Greenspace Hack data against an external dataset.
var turf = require("@turf/turf"); var getJSON = require("async-get-json"); var greenspaces = await getJSON(""); var lsoas = await getJSON(""); // Find the most deprived LSOAs with no greenspace within 1km var deprived = []; turf.featureEach(lsoas, function(feature,index) { if (<20) return; var nearestGreenspace = turf.nearestPoint(feature, greenspaces); if (turf.distance(feature,nearestGreenspace)>=1) deprived.push(feature); }); // Show on a map deprived;

no comments

    sign in to comment