GithubHelp home page GithubHelp logo

isabella232 / malaria-mapping Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mapbox/malaria-mapping

0.0 0.0 0.0 1.97 MB

Visualize the mapping efforts of HOT and DigitalGlobe support of Malaria elimination

Home Page: https://labs.mapbox.com/malaria-mapping/

License: MIT License

JavaScript 51.46% Shell 12.09% HTML 22.90% CSS 13.55%

malaria-mapping's Introduction

Mapping for Malaria Elimination

Visualize the mapping efforts of HOT and DigitalGlobe support of Malaria Elimination

๐ŸŒ https://labs.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.

malaria-mapping's People

Contributors

kepta avatar kupendrayadav avatar lukasmartinelli avatar mikelmaron avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.