Welcome to the developer section of winterolympicsmedals.com.
Introduction
All the information you can see here is based on a data set released by the Guardian Data Blog. Using this web site and the API we make it easier for you to drill down to the information you need.
YQL - the API enpoint
Using this table you can now get the statistics of the Winter Olympics in terms of medals from 1924 up to 2006 (the 2010 data is of course not in there yet). Instead of architecting an own API and get hardware to support it, all we do is using the Yahoo Query Language an infrastructure. This means in order to get information back from this page you need to access the following URL:
http://query.yahooapis.com/v1/public/yql?q=
use "http%3A%2F%winterolympicsmedals.com%2Fwintermedals.xml" as medals;
select {what} from medals where {conditions}
&format={format}&callback={callback}
The return formats are XML and JSON and when you provide a callback parameter JSON-P. YQL is a SQL-style syntax, so you define what you want tp get from the data set under which conditions. Following are some demos on how to do that.
Demo requests
Here are a few demos how to use the YQL Open Table:
Get all medal information:
use "http://winterolympicsmedals.com/wintermedals.xml" as medals;
select * from medals
See it as XML or in the YQL console (needs a Yahoo Login)
UK Gold medals:
use "http://winterolympicsmedals.com/wintermedals.xml" as medals;
select * from medals where country="gbr" and type="gold"
See it as XML or in the YQL console (needs a Yahoo Login)
All Skating medals in the Speed Skating discipline won by men
use "http://winterolympicsmedals.com/wintermedals.xml" as medals;
select * from medals where sport="skating"
and discipline="speed skating"
and gender="m"
See it as XML or in the YQL console (needs a Yahoo Login)
All US, Canadian and French Medals in the Games before 2000
use "http://winterolympicsmedals.com/wintermedals.xml" as medals;
select * from medals where country in
('usa','can','fra') and year="19"
Available filters
You can get the medal information and filter your search by the following criteria:
year- the year of the olympicscity- the city it was held in, like "Lillehammer" or "Sarajevo"sport- the sportdiscipline- the sub-disciplinecountry- the country as an NOC codeevent- the event, like "alpine combined" or "two-man"gender- the athlete's gender, X is for pair sportstype- the medal type (Gold, Silver, Bronze)
Any of these could also be used as a wildcard, so country="g" would find GBR, FRG, GDR, YUG and GER.