Visualize the mapping efforts of HOT and DigitalGlobe support of Malaria Elimination
🌍 https://mapbox.com/malaria-mapping
📖 https://www.mapbox.com/blog/world-malaria-day
See the Tasking Manager to learn how you can help and finish mapping 500,000 km2!
- SQLite 3
- tippecanoe
- Node 4
npm install .
npm install -g osm-qa-filter
You can find the data processing scripts in scripts
.
cd ./scripts
- Prepare the QA tiles extract for the affected regions
./download-extract.sh
- Filter buildings using osm-qa-filter to limit it to buildings edited after 1st of July 2016.
osm-qa-filter \
-m malaria.qa.mbtiles -o malaria_buildings.geojson \
--filter '["all", ["has", "building"], [">=", "@timestamp", 1467331200]]'
- Filter to the mapped area
./filter-area.js -i malaria_buildings.geojson -o malaria_buildings_filtered.geojson
- Add the date as attribute to the features.
./day.js -i malaria_buildings_filtered.geojson -o malaria_buildings_day.geojson
- Calculate centroids of all the buildings
./centroid.js -i malaria_buildings_day.geojson -o malaria_buildings_day_centroid.geojson
- Encode vector tiles (polygons for high zoom levels and points for low zoom levels) and stitch them back together into a single MBTiles.
tippecanoe --layer malaria_building -o malaria_buildings.mbtiles --include "@day" --minimum-zoom=11 --maximum-zoom=13 < malaria_buildings_day.geojson
tippecanoe --layer malaria_building -o malaria_buildings_low.mbtiles --include "@day" --minimum-zoom=0 --maximum-zoom=10 < malaria_buildings_day_centroid.geojson
./patch.sh malaria_buildings_low.mbtiles malaria_buildings.mbtiles
echo "update metadata set value=0 where name = 'minzoom';" | sqlite3 malaria_buildings.mbtiles
rm malaria_buildings_low.mbtiles
- Calculate buildings per day and total unique contributors
./building-totals.js -i malaria_buildings_day_centroid.geojson -o malaria_buildings_by_day.json
./contributor-totals.js -i malaria_buildings_day.geojson -o malaria_contributors.json
- Upload the vector tiles to Mapbox Studio!
You can find the data processing scripts in scripts
.
cd ./scripts
./generate-day-stats.sh
This will generate a CSV file with daily statistics to show the progress.