Google

Home
Most Popular
Petals

|
*
2008/05/29
 20:30:40

NWS Alerts -> Twitter

Some of you may remember a discussion on Twitter of StormSiren prompting an idea to take the National Weather Service alerts and feed them into Twitter. A month and a half later storms come along and I decide to finally look into it. The backend isn't clean but should be solid enough for now. I'm somewhat considering this a trial for this year.

I've currently set up three feeds for three counties near me. Given I need to generate a new alias for each one and go through the signup process I'm not excited about the work behind scaling it, but would possibly entertain requests for more Minnesota counties.

Enjoy, and let me know if you find them useful. As a warning to prevent future trouble, I can't guarantee that these will be reliable and working (both on my end, and because it's Twitter) - don't use them as your primary way of receiving alerts about bad weather.

#
By Erik on 2008/05/29 at 21:15:41

Cool!

Did you use some of the code from StormSiren? I assume you're polling the NWS data from your server and then tweeting it via the Twitter API?

I'm not sure how well this type of thing load balances, but I'd be willing to host on my linode as well to either take some of the load or at least for failover purposes. That may introduce quite a bit of complexity, though, I guess.

#
By Jeremy on 2008/05/30 at 19:13:47

All the code from StormSiren actually. It's the regular program with a few modifications to the sms format, kicking it out to an internal email address. That address feeds a script which parses the output and submits it to the appropriate Twitter accounts (using the "web" API).

It wouldn't scale well now, but if it goes well I may try to refactor parts of it - there's a lot of the program that isn't needed for this, and other functionality that would be more useful. If I ended up doing that, I'll have to keep in mind scaling options. I've already discovered that Twitter handles rejecting duplicate tweets. :)

#
By Jeremy on 2008/05/30 at 20:31:14

Added Washington County at the request of JL!.