I thought building the dial (adjacent radar sites) data for my mobile radar site would be a tedious and entirely painful process. As it turns out, it really wasn’t that difficult. I knew the data was out there in some form, if you visit any of the radar sites on the NWS website, you get a nice dial in the upper-left part of the screen, but I couldn’t find a good text file with that information. Just when I was about to stat copying it by hand, I thought “maybe this is parseable”.
It turns out that the page is parseable, but it gets ugly at times. To get a list of all the sites, I grabbed a file from Unisys. I could extract the site, city, and state from there, so then all I needed was to grab the 8 (or fewer surrounding sites) and dump them all into a Perl hash. So I wrote a bit of code to do just that. It’s ugly, but it’s an example of what you can do when you really, really don’t want to do something by hand: Continue reading