Permalink
Browse files

Update snapshot script and info

  • Loading branch information...
nickmcintyre committed Aug 31, 2017
1 parent 1eab430 commit 3dff743c8e80ad0bde2cf3358c569c6411628653
Showing with 43 additions and 14 deletions.
  1. +1 −1 LICENSE
  2. +10 −6 README.md
  3. +1 −1 batonrouge/index.html
  4. +1 −1 beaumont/index.html
  5. +1 −1 galveston/index.html
  6. +1 −1 houston/index.html
  7. +1 −1 i45corridor/index.html
  8. +1 −1 lakecharles/index.html
  9. +1 −1 neworleans/index.html
  10. +25 −0 snapshot/uflood-snapshot.py
View
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017 OpenStreetMap India, Tailwind Labs LLC, Marine Weather and Climate LLC
Copyright (c) 2017 OpenStreetMap India, Tailwind Labs LLC, Marine Weather and Climate LLC, Weather Tactics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
View
@@ -1,22 +1,26 @@
## U-Flood Maps
Please note: this is alpha software, so bear with us. We hope it will be useful to communities impacted by Hurricane Harvey and will do our best to refine things as we collect feedback.
Interactive map to visualize and crowdsource flood related information using [OpenStreetMap](http://openstreetmap.in/#5/22.147/79.102) and [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/). Read more in [the](http://timesofindia.indiatimes.com/tech/apps/Bangalore-techies-build-app-to-help-Chennai-flood-victims/articleshow/50039041.cms) [press](http://www.thehindu.com/news/cities/chennai/crowdsourced-map-to-mark-inundated-areas/article7935008.ece)
Interactive map to visualize and crowdsource flood related information using [OpenStreetMap](http://openstreetmap.in/#5/22.147/79.102) and [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/). Read more in the press
- [CNET](https://www.cnet.com/news/maps-of-houstons-floods-shows-its-worse-than-you-thought-hurricane-harvey/)
- [Mashable](http://mashable.com/2017/08/30/crowdsource-map-u-flood-tracks-harvey-flooding/#WWljEZGHGmqF)
–[Times of India](http://timesofindia.indiatimes.com/tech/apps/Bangalore-techies-build-app-to-help-Chennai-flood-victims/articleshow/50039041.cms)
- [The Hindu](http://www.thehindu.com/news/cities/chennai/crowdsourced-map-to-mark-inundated-areas/article7935008.ece)
### A quick how-to
Simply click/tap on a road segment to mark it as flooded or cleared. Road (de)selection works above zoom level 14. The higher the level, the more zoomed in you are. You can view the map's current zoom level in your browser's address bar at any time; it's the first number after your city's name. For example, the URL https://map.u-flood.com/galveston/#13.97/29.2999/-94.7999 is at zoom level 13.97.
### Missing streets
If your street, building or neighborhood name is missing on the map, you can add it to the basemap directly by editing [OpenStreetMap](http://tasks.openstreetmap.in/project/62). The flood map will be updated with the new street in under 10 minutes.
If your street, building or neighborhood name is missing on the map, you can add it to the basemap directly by editing [OpenStreetMap](http://tasks.openstreetmap.us/). The flood map will be updated with the new street in under 10 minutes.
### Flooded Streets Data
The flooded streets layer is contributed by the public. Contributions are anonymous with no version control for the sake of simplicity.
#### Data dump
You are encouraged to make use of the collected data for further analysis. Download the latest flooded streets layer as a geojson using [this Ajax request](https://github.com/osm-in/flood-map/blob/gh-pages/js/chennai.js#L145-L175).
- [11AM Dec 2](https://github.com/osm-in/flood-map/blob/gh-pages/data/chennai-flooded-streets-Dec2.geojson)
#### Data Archive
You are encouraged to make use of the collected data for further analysis. Download the latest flooded streets layer as a geojson using [this script](https://github.com/tailwindlabs/flood-map/blob/gh-pages/snapshot/uflood-snapshot.py).
Weather Tactics has made hourly snapshots for cities affected by Hurricane Harvey available via [Dropbox](https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0).
### Data Sources
- **Base Layer** - [OpenStreetMap](http://osm.org)
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads in Baton Rouge. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads in Baton Rouge. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads in the Beaumont Region. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads in the Beaumont Region. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads in Galveston. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads in Galveston. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads in Houston. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads in Houston. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads between Houston and Galveston. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads between Houston and Galveston. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads in Lake Charles. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads in Lake Charles. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
View
@@ -39,7 +39,7 @@ <h2>Street Map</h2>
<strong>
<span id="feature-count">...</span>
</strong> inundated roads reported</p>
<p>This is a crowdsourced effort to map inundated roads in New Orleans. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://github.com/tailwindlabs/flood-map">open</a>.</p>
<p>This is a crowdsourced effort to map inundated roads in New Orleans. Report a flooded (or cleared) street by zooming into the map and clicking/tapping it. All data are <a href="https://www.dropbox.com/sh/525vvot1fe56941/AABRuDQF9qqHs-7B4GNDAdxTa?dl=0">open</a>.</p>
<p>Big thanks to OpenStreetMap India for the code!</p>
</div>
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
import urllib.request
site_keys = {
'batonrouge': 'cj6wnjoyd1ee238o3n9wbuhr5',
'beaumont': 'cj6wnis8c184t2wuhnxnqdwco',
'galveston': 'cj6wngom11diq32rp0exejr1l',
'houston': 'cj6v4db3r0wpt2wrp4ih050r5',
'i45corrido': 'cj6wnkm0k1fg733s66fbr8wmc',
'lakecharles': 'cj6wnk4ir1djx32rpvyugjg4x',
'neworleans': 'cj6wnkash174t2qtbna0qkyuy'
}
base = 'https://api.mapbox.com/datasets/v1/tailwindlabs/{}/features'
token = 'sk.eyJ1IjoidGFpbHdpbmRsYWJzIiwiYSI6ImNqNnY0cGN2MzEwM3EzMnBkNHM3OWoxaWgifQ.3rwB8LW4khqcDoEekNCbTg'
# Get the archives
for key in site_keys.keys():
# Get and save the file
base_this = base.format(site_keys[key])
try:
urllib.request.urlretrieve('{}?access_token={}'.format(base_this, token), key + '.geojson')
except urllib.error.URLError as e:
print('Error: ' + e.reason)

0 comments on commit 3dff743

Please sign in to comment.