5/4/15

Building an automated ski day counter using IFTTT (If This Then That) and an iPhone


If you happen to be lucky enough to ski so many days that they are hard to keep track of, try this trick to get a good count of each one.

1. Head over to www.ifttt.com and create an account. If this then that lets you build 'recipes' based on actions that happen in the web or cloud.

2. Install the IFTTT app on your iPhone and set it up for location tracking.

3. Create a recipe that fires each time you and your phone enter into a geo radius based around your local ski hill.


4. Once you have the rule set to fire when you get to the ski hill, just decide how you want to record the data. In my case i just update my google cal to show a ski day


That is all there is to it. QED. The hard part is finding a lifestyle that lets you get too many ski days to count...

Happy coding.

6/13/14

Using Google BigQuery to find the temperature history for your birthday or the best day for your wedding

Want to know what the average temperature has been on your birthday for the past several years or maybe the most sunny day of the month for your wedding?

Log into google and wander over to:

https://bigquery.cloud.google.com/table/publicdata:samples.gsod

This will let you query the GSOD (weather observatory station records) thanks to google big data.

Then execute this query:

SELECT year, mean_temp, max_temperature FROM
 [publicdata:samples.gsod] where wban_number=14742 and month=X and day=YY order by year asc;

You'll have to determine the nearest wban_number for the weather station closest to you - to get this yead over to:

http://academic.udayton.edu/kissock/http/Weather/citywbanwmo.txt

And search for your city or state.

Once you are done, you'll end up with numbers than can be plotted as a trend thusly:


If anyone can find a public dB of WBAN lat/lon let me know.

have fun.

bill