I'm super happy to be able to add myself to the list of people who publish weather info in their posts!
I've had a long-standing goal to include weather info on all of my posts on my site! In fact, I actually started collecting historical weather info just so that I could backfill the data on my site once I added the feature. The weather database I've been collecting goes back to 2012! I decided it's been long enough and bit the bullet and sat down to finally knock it out.
I've had the current weather up in my website header since 2016, and it turns out that I was able to reuse a lot of that existing code.
Today I finally added support for storing weather info per post, and adding it when new posts are created. The weather is based on my current location, which I've already been automatically including in my posts for a long time. So now, when a new post is created, if the cached weather info that is shown in the header is recent enough, it bakes it into the post's storage file.
Now my posts will all have little weather icons and the current temperature!
I decided on using an icon font for the weather icons so that they are all visually consistent and inline with the text. The icon set I'm using is http://erikflowers.github.io/weather-icons/ The weather info itself comes from Wunderground, although I may switch to Dark Sky in the future since they have a higher per-day API limit.
I also decided to put the weather info on the same line as the location name, since I feel like this information very closely linked to the location. (It's also stored in the location property internally.)
I'm pretty excited to finally have this done, just in time for all my posts in 2018 to be weather-tagged!
I'm postponing the work of backfilling all my past posts since that is going to take quite a bit of effort. I'll add it to the ever-growing list of old data to import to my site! 😂
The real reason I wrote my Emoji Detector library was for today's project. My website now has URLs that list every post containing specific emoji!
My site finds any emoji that I used in the post content, and indexes those in a separate database table. It uses that table to create a page listing all the emoji I've ever used, as well as emoji feeds showing all posts containing a specific emoji. Try it!
Behold: All the emoji I've used in posts, sorted by most used first!