Yup, here's the entry for the 28th, that I'm writing the afternoon of the 29th.
My big plans for the 28th were:
Didn't do it.
Did it and more.
Though I didn't touch the HPC tropical advisories yet, I decided I'd rather work on something that already existed. Especially given that Sandy was moving faster than originally expected and I wondered if the NHC -> HPC hand-off wouldn't actually happen out at sea (and as I write this, it does indeed look like Sandy will still officially be a Hurricane as she makes landfall).
So I decided I wanted to see about parsing the CAP alerts on the NWS.
I looked into RCAP (also see the CAP validator which is based on RCAP), but it only appears to be appropriate at this time for parsing the individual alerts, and can't (or can't yet) handle the index files that the NWS produces (and I don't want to have to scrape the 100+ alerts individually).
I looked into feedzirra for more
general RSS parsing, but apparently feedzirra pukes when it encounters
colons in tags. The
CAP specific stuff is all things like cap:event
, cap:severity
, etc.
Feedzirra doesn't even produce an error; it just won't return any data.
Luckily, through a lot more digging, I did finally find a project that had most of what I needed to get going.
noaa-alerts is a Ruby-based
parser that supports the NWS CAP alert feed. So you can do things like
noaa = Noaa::Client.new('ny')
to get the New York state weather alerts.
It sort of supports the national level (just sub us
as the state
code), but then there's no way (yet?) to figure out what state the
warning is for.
Hurricane Watch is where I put the NWS alerts. I ended up settling on parsing each state's feed individually, so I could group the alerts by state.
I'm sure it would be much more efficient to pull things at the national level (one file versus the current 14), but I was happy to have been able to get an "MVP" going so quickly.
Here's a screenshot:
Didn't do it. One of these days.