Show off the local weather with a YQL-driven badge

A few weeks ago we showed you here how to extend the Yahoo Weather API with YQL to do proper geo lookups. If you already forgot, here's the link again.

Now, to celebrate the release of the new Yahoo weather homepages in Europe, we thought it would be good to make it dead easy for you to display local weather powered by our API on your website, blog, MySpace page or wherever you want to.

This is the result:

Display the local weather with a simple badge by  you.

Using the badge is ridiculously simple. You can use the online generator to create yours:

Display the local weather with a simple badge by  you.

As a developer you can also host the single JavaScript file yourself and display badges like this:

The above example:

<script src="weather.js">city:sunnyvale,units:f,styling:true</script>

Paris, France in Celsius and with no styling:

<script src="weather.js">city:paris,units:c,styling:false</script>

Ankara, Turkey in Fahrenheit and with styling:

<script src="weather.js">city:ankara,units:f,styling:true</script>

Pretty self-explanatory. The code of the badge and the badge generator is available on GitHub in case you want to dive deeper.

Chris Heilmann
YDN Evangelist

Follow @YDN on Twitter.