Visualize the mapping efforts of HOT and DigitalGlobe support of Malaria elimination
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
scripts
.gitignore
LICENSE
README.md
gif.html
index.css
index.html
index.js
malaria_buildings_by_day.json
package.json

README.md

Mapping for Malaria Elimination

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!

Malaria mapping progress

Requirements

npm install .
npm install -g osm-qa-filter

Data Processing

You can find the data processing scripts in scripts.

cd ./scripts
  1. Prepare the QA tiles extract for the affected regions
./download-extract.sh
  1. 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]]'
  1. Filter to the mapped area
./filter-area.js -i malaria_buildings.geojson -o malaria_buildings_filtered.geojson
  1. Add the date as attribute to the features.
./day.js -i malaria_buildings_filtered.geojson -o malaria_buildings_day.geojson
  1. Calculate centroids of all the buildings
./centroid.js -i malaria_buildings_day.geojson -o malaria_buildings_day_centroid.geojson
  1. 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
  1. 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
  1. Upload the vector tiles to Mapbox Studio!

Generate Daily Statistics

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.