Closed jpettersson closed 12 years ago
I'm planning on modifying the gem API a bit and bumping to v0.1.0 next week. It may be worth waiting to implement new providers until then.
The new API will be something like:
report = Sandy::Report.new(lat, lng, options)
report.areas = [<Area>, <Area>] # where area is the most granular location measurement]
Sandy::Report#areas
# => [<Area>]
Sandy::Area#provider
# => "ConEd"
I'd like to eliminate the idea of regions and instead allow application developers to infer region names through geocoding. I also would like to include bounding boxes (where available) with the area objects based on shape files bundled with the gem.
Sounds like a good direction. I like the geo-fence feature, it could be useful. I do think it's important to still offer functionality to pull down all data from one or more provider as well though. The motivation for this is that a provider and a region are not synonymous. Some people might only care about one provider while others only care about a certain geographical box (with all or some provider data).
Perhaps the geo fence & providers could be a part of the options instead? Something like:
report = Sandy::Report.new({
:providers => ['ConEd', 'LIPA']
:geofence => {
__some GPS box annotation__
}
__other options__
})
It was so quick to implement PSEG so I already merged it into master on my Sandy fork and am running it in production. I thought it was important to start the NJ data collection before this new storm arrived. The PSEG provider is currently only pulling down their top level areas because they keep their data in different files, but it's enough for my presentation right now.
You can take a look at the implementation at: https://github.com/jpettersson/sandy/tree/pseg_provider
A preview of the NJ data is currently available at: http://nycpowerstatus.com/new-jersey
I've also manually fixed all the GPS data for NYC and Long Island, so it's much more accurate now. It would be pretty nice to bundle this data with the gem so that others don't have to go through the same annoyance (and since LIPA doesn't even supply any coordinates).
Jonathan, great! The direction I'm moving in now is:
Sandy::Report.new(lat, lng, providers = [], options = {}) where all providers will be the default for an empty argument and options may include a distance range.
If you submit a pull req tonight I'll merge your NJ provider info and bump to v0.0.6
Cameron, I just wanted to update you on my progress. I got a bit slammed with work at the end of the week but I'm planning on cleaning up the PSEG GPS data this weekend and send you a pull request where the data is bundled as YAML and inserted into the provider responses.
I also found that two other providers in NJ use the exact same system as ConEd: JCPL & OrangeRockland. I was curios so I added them as Providers in my master branch:
https://github.com/jpettersson/sandy/tree/master/lib/sandy/providers
I'm planning on adding these as sources to my site, but I'm focusing on the PSEG provider first.
Hey Jonathan, sounds good on the geo data, yml format seems the way to go. FYI there are a bunch of providers that likely use the same architecture. The platforms were all developed by the same consulting firm, iFactor. Here is a list: http://www.ifactorconsulting.com/storm-center-put-to-the-test-during-sandy/.
ConEd – http://apps.coned.com/stormcenter_external/default.html National Grid – https://www1.nationalgridus.com/PowerOutageMap Orange & Rockland – http://apps.coned.com/stormcenter_external_oru/default.html Central Hudson Gas & Electric – http://stormcentral.cenhud.com/default.aspx FirstEnergy – NJ JCP&L – http://outages.firstenergycorp.com/nj.html FirstEnergy – PA Operating Companies – http://outages.firstenergycorp.com/pa.html FirstEnergy – MD/WV Operating Companies – http://outages.firstenergycorp.com/mdwv.html FirstEnergy – OH Operating Companies – http://outages.firstenergycorp.com/oh.html Delmarva Power – http://www.delmarva.com/home/emergency/maps/stormcenter/ Atlantic City Electric – http://www.atlanticcityelectric.com/home/emergency/maps/stormcenter/ Pepco – http://www.pepco.com/home/emergency/maps/stormcenter/ Long Island Power – http://www.lipower.org/stormcenter/outagemap.html
I'm working on a provider for PSEG.
I'm scraping the data from their outage map: http://www.pseg.com/home/customer_service/outage_info/outagemap.jsp
It's conveniently available at: http://www.pseg.com/outagemap/Customer%20Outage%20Application/Web%20Pages/GML/State.gml