What is this?

Here's a solution if you always wanted to display the local weather on your web site, blog or other web document but you don't want to install Plug-Ins or read up on documentation how to do that.

If you want a badge like the one on your right, simply enter your information in the form below and hit the "generate" button.

Then copy and paste the code that gets generated into any HTML document and it will display your weather.

Demo Badge

Create your own badge

How does this work?

The weather information displayed in the badge is provided by The Weather Channel and Yahoo makes it available for developers as weather feeds.

This solution uses these feed (and some other Yahoo tools) to make it easy for you to show the local weather without needing to know any programming. Please also check the Terms and Conditions of the weather feeds before using this commercially.

Developers, here's your information…

As you can see from the generated code, all you need to do to display a badge is add the script with a few parameters into your page:

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

So say, you'd want the badge to show New York, in Fahrenheit and without any styles, you simple use the following:

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

The source code of the badge is available on GitHub in case you want to host the files yourself.

Under the hood, a lot of YQL magic happens and I explained that in detail in this blog post on the Yahoo Developer Network blog.