Blog

Predicting weather on my wedding day with Javascript

image

I don’t usually mix coding with personal life but the more I write code the more I think about how I can use it outside of work. In this case, I’m preparing for a wedding in March and my fiancee and I often get into conversations about how a March wedding in Salt Lake City will be. Freezing cold? Unseasonably warm? Windy? There’s lots of questions, especially when we want great pictures.

I decided to add some rigor to this question. I found the Forecast.io API and thought this would be perfect. I could find out what various aspects of the weather would be like on my wedding day and plot them accordingly. Using a great node library I was able to avoid writing boilerplate code. From there I did a few transformations inside of the call back in order to translate unix time into one Plot.ly would like. I looked at the temperature, humidity, windiness and cloudiness by the hour.

It should be a fairly humid day and fortunately we won’t be outside at 1 AM. It also looks like it wont be windy (10 MPH on average not plotted) at all and intermittent clouds. I think it’s hard to ask for much more from a March day in Utah for a wedding.

Code:

Jowanza JosephData