OGDI DataLab is written using C# and the .NET Framework, targeted for Microsoft's
Windows Azure Platform cloud-computing
platform. Data Service.
The DataService uses RESTful Web service to expose data for programmatic access via a number of formats, including Open Data Protocol (OData)**, an extension to **Atom Publishing Protocol (AtomPub), Keyhole Markup Language (KML), JSON and JSONP.
The Data Browser is written an ASP.NET MVC 3.0 and uses jQuery and a variety of other open source components and enables users to browse and query published data.
OGDI DataLab exposes data through REST Web services. The basic format of an OGDI service call is http://ogdi.cloudapp.net/v1/container/dataset?query, where:
Note that OGDI DataLab currently only supports the $filter and $top query options in the WCF Data Services query syntax.
Also note that if a property has a null value for a particular entity in the data set, it will be omitted entirely from the result set returned by OGDI DataLab. For example, in the Crime Incidents data set, the "method" property is only returned for records that have a "method" value in the underlying data set. Your application design should take this into account and handle potentially missing properties.
By default, OGDI DataLab returns data in the Open Data Protocol (OData) format. This format extends the broadly adopted Atom Publishing Protocol and can be easily consumed by a variety of platforms, including Microsoft .NET, Java, Ruby, PHP, and Python. Refer to the code samples on the Data Browser page for examples.
http://banffopendata.cloudapp.net:8080/v1/BanffData/PetLicences?$filter=DOGBREED eq 'GOLDEN RETRIEVER'&format=json
OGDI DataLab can also return data in the RDF (Resource Description Framework) format. RDF is a graph model for describing formally web resources and their associated metadata. Developed by W3C, RDF is a base language for semantic Web. To return data in RDF format, simply append the format=rdf parameter to your query:
http://banffopendata.cloudapp.net:8080/v1/BanffData/PetLicences?$filter=DOGBREED eq 'GOLDEN RETRIEVER'&format=rdf
Many of the data sets in OGDI DataLab also include geospatial data, which is returned in the Keyhole Markup Language (KML) format. This format is compatible with popular desktop and Web-based mapping technologies including Microsoft Bing Maps, Google Maps, Yahoo! Maps, and Google Earth.
To return geospatial data in KML format, append the format=kml parameter to your query. For example, to retrieve all the multiple use trails in Banff's Trails data:
http://banffopendata.cloudapp.net:8080/v1/BanffData/PetLicences?$filter=DOGBREED eq 'GOLDEN RETRIEVER'&format=kml
Note that if the data set that you are using does not include any geospatial data, a KML query to OGDI DataLab will return an empty result set.
OGDI DataLab and the underlying Windows Azure Table Storage service support paging through large sets of query results. The documentation for Query Timeout and Pagination in the Windows Azure Table Storage service provides a complete description of how OGDI and the underlying Azure platform support paging. You can also refer to the "C#/ASP.NET Paging" sample on the Data Browser page, which demonstrates how to perform paged queries using the WCF Data Services client library.
Developers using Microsoft Visual Studio 2010 (or later) can use WCF Data Services to access data from OGDI through easy-to-use .NET classes. Within Visual Studio, this is accomplished by using the Add Service Reference feature (see .NET samples on the Data Browser page). To make accessing OGDI data easier, Java developers can use Restlet Extension for WCF Data Services. PHP developers can take advantage of the Toolkit for Toolkit for PHP with WCF Data Services.