Weather via finger, an update

Overview

I meant to write this post in Febuary, but never had the time.

Something exploded at Tuesday 2016-02-16.

I created the finger weather service in 2012, and announced it at Reddit. It got some mentions in Norwegian blogs, and i gathered a few regular users. See old stats in previous post.

I’m no fan of social media, and try to stay away. But apparently someone recently noticed the service and tweeted about it. Then blogs. Since I have regularly received “thank you” mails due to one of the random messages at the bottom (Mail a “thank you” to finger@falkp.no if you like the service.).

It not only overwhelmed me, but the service was having trouble keeping up. The code was my first Python project of some size, is not 3.0, and has not been revisited since. It contains lots of unrelated cruft (news, time, date, coffee) which was the start of a terminal screensaver and is certainly not optimized for lots of clients.

After a few freezes, one which caused a night of downtime, I enabled rate limiting (ufw limit), which blocks > 4 subsequent requests from one IP within 30 seconds. The data is cached for 20 minutes anyway (a requirement from the data source), so there’s no use in hammering.

Lot’s of tweets thanked the Meteorological Institute for this: “Norwegian Meteorological Institute provides CLI weather reports.”. While I’m thankful to them for their open data, they do not have any further involvement in this service.

Common questions I’ve received:

Fahrenheit and u.s. zip codes.

Sorry, won’t happen. Not because I don’t want to, but because I don’t have time. I will accept pull requests on github. Zip codes may be hard.

Can’t find my city.

The solution here was to use frankfurtam. The full name will also work, frankfurtammain.

  • Some cities will simply not be reachable due to the poor look-up method in use.

If I ever get time, I’d like to rewrite how one locates cities, but I’m guessing it won’t happen.

Data doesn’t match yr.no / why isn’t my weather hourly

Yr.no supplies data for most of the world, but international treaties keep them from supplying hourly for any place outside their own model (meaning outside of scandinavia). So in scandinavia you’ll see something like this:

$ finger oslo@graph.no|grep Hour
22 23 00 01 02 03 04_05_06_07_08_09_10_11_12_13_14_15_16_17_18_19 Hour

while in other places it will look like this:

finger wellington@graph.no|grep Hour
_09_12_15 18 21 00 03 06_09_12_15 18 21 00 03 06 Hour

I’ve asked them about it, and their hoping for a change to this policy for the coutries which are members of ECMWF.