FireWater is a perfect storm weather prediction application.
FireWater uses historical weather disaster data from NOAA and weather insights to predict locations susceptible to flooding and wildfires.
FireWater was developed for the IBM Sparkathon
http://firewater.mybluemix.net
Running locally add values to .env file. Look at env-sample.json
cp env-sample.json env.json
Import storm data and ugc areas to Cloudant
http://www1.ncdc.noaa.gov/pub/data/swdi/stormevents/csvfiles/legacy
https://github.com/avantassel/csv-import
pip install requests
# import UGC areas
python csv-import.py -f ~/Downloads/ugc_areas.csv -d stormdata_ugc_areas -u 5a96fba5-a18f-4c28-b935-06dc8f5832cf-bluemix -a
# import storm data stormdata_1996.csv - stormdata_2013.csv
python csv-import.py -f ~/Downloads/stormdata_2013.csv -d stormdata_geo -u 5a96fba5-a18f-4c28-b935-06dc8f5832cf-bluemix -a -g BEGIN_LAT,BEGIN_LON
Create a geo index to query by lat/lng
{
"_id": "_design/geodd",
"views": {},
"language": "javascript",
"st_indexes": {
"geoidx": {
"index": "function(doc) {if (doc.geometry && doc.geometry.coordinates) {st_index(doc.geometry);}}"
}
}
}Create a view to group by EVENT_TYPE
{
"_id": "_design/events",
"language": "javascript",
"views": {
"types": {
"map": "function(doc) { emit(doc.EVENT_TYPE, 1) }",
"reduce": "_sum"
}
}
} # if you add models you will need to run this
lb-ng server/server.js client/js/lb-services.js
cf push firewater
cf logs firewater --recent
- CloudantDB
- Weather Insights
- Twitter Insights
- Apache Spark
- Strongloop
