Weather Alert – Nerd Style

Dark Sky

Sometime last year, I became aware of an iPhone (I’m on 4s) weather app called “Dark Sky.”

I downloaded, and was blown away. It’s not your traditional weather app (Temp/Humidity etc), but it was more of a forecast app: It would say “Light rain in 20 minutes” – and it would be correct!

A month or two later – I dunno – I ran across a mention that the Dark Sky folks had a web site for weather forecasting, Forecast.io.

It’s amazing.

Totally accurate? Nope.

Impressive in its depth? Yep.

Slick design? Yep deux.

One of the things that caught my (nerdy) eyes was that they had an API of weather data – and free for the casual user (1000 free hits per day; each 10k after that $1!).

So I signed up, and got to work integrating it into my geistlinger.com site.

Geistlinger.com weather integration
Forecast.io data on Geistlinger.com

The fun part – and the rough part – was integration entailed the following to make it “work” for me:

  • API call to forecast.io
  • JSON response
  • Use PHP json_decode () function – new to me – to parse the JSON response
  • CSS3 (rounded elements and so on)
  • HTML5 – Canvas elements (and hacking same with JS)
  • Create weather display area (PHP include)
  • Jquery to toggle between current and detail screens (still working on same; not quite the UI I want)
  • JS AJAX call to get the new data, parse the JSON, pass necessary data back to JS, and then (re-)populate the data points

For me, that’s fun. And right now it works.

Whoo-hoo.

Next: Geo-location, so I can display weather where you are, not where I am. Hmm…good thing?

I needs to do more work with APIs – I love Google Maps, Forecast.io is great. I’ve got to delve into more mashups – work, but fun (dorky) work.