developmentseed / road-planning-datapipeline

Data pipeline for the Road Planning tool
MIT License
0 stars 1 forks source link

Segment count #34

Closed olafveerman closed 3 years ago

olafveerman commented 3 years ago

This PR does a couple of things:

Segment Usage - Markets

This branch was used to generate the segment usage indicator for markets. I did the following to generate it:

  1. Generate GeoJSON from the Market data provided by the WB
    ogr2ogr -f "GeoJSON" market.geojson ~/Downloads/market/Marches_Haiti_IICA1977.shp -t_srs EPSG:4326
  2. Generate GeoJSON for the populated place data ogr2ogr -f "GeoJSON" places.geojson ~/Downloads/population/'MT_104_Populated Places CNIGS.shp' -t_srs EPSG:4326
  3. Generate OD pairs from markets to settlements
    yarn od generate -m closest places.geojson market.geojson
  4. Upload result to S3
    aws s3 cp odpairs.json s3://road-data-input-haiti/od/od-market.json
    aws s3 cp market.geojson s3://road-data-input-haiti/poi/market.geojson
    aws s3 cp places.geojson s3://road-data-input-haiti/population/places.geojson
  5. Run the script to generate segment counts
    bash segment-count/count.sh
  6. Generate the indicator data
    bash indicators/segment-usage.sh