Mixing and matching (weather) services and data using YQL
Some recent discussion about the weather.forecast table lead to a really great example of mixing Yahoo and external services together.
The original poster wanted to get the forecast from the weather.forecast table for a non-US location. The table itself represents these types of location using a special key. For example, Prague (Czech Republic) is EZXX0012.
A followup post indicate that weather.com has a service that actually turns text-based locations (like “Prague”) into a list of possible location IDs that are suitable for the forecast table:
http://xoap.weather.com/search/search?where=prague
So now we have a great “join” situation, we can use one web service to join data in another completely different service and get the result we want for the inputs we have! So to get weather for all “prague”s in the world like this in YQL its a simple sub-select:
select * from weather.forecast where location in
(select id from xml where
url="http://xoap.weather.com/search/search?where=prague"
and itemPath="search.loc")
You can see YQL run this query in the console (you’ll need a Yahoo! login to get to the page).
December 4th, 2008 at 2:18 am
Great, great post!
Living in Canada, and developing for Canadians, this makes me a little more comfortable. For the location search, to, how can we limit the results to more than just city? Is there an API reference for that weather.com service?\
Thanks for helping!
December 4th, 2008 at 1:24 pm
[...] later – joel UPDATE: Ok – I kept digging and found this blog entry by Jonathan Trevor – whom I presume is a developer involved with Yahoo. It shows us that we [...]
March 1st, 2010 at 8:11 pm
So, this post was a good read!
May 24th, 2010 at 6:55 am
I always like Sunny weather and disliked gloomy rainy weather..*”
August 2nd, 2010 at 3:52 pm
the weather these days is hotter than the previous decades, i guess it is the effect of global warming.`,