Mashup Australia competition entry from NeoGopher
Our submission has two parts:
Part one: 16 MashupAustralia lists in NeoGopher.
NeoGopher is a universa data browser developed in Melbourne, Australia and is designed to allow browsing of an HTTP web based API. NeoGopher is the intersection of linked data and the web. We have created 16 NeoGopher lists, each list presenting a data set from data.australia.gov.au. To see our MashupAustralia lists, download NeoGopher
Part two: 26 HTTP web based APIs.
We have converted CSV and XLS data from data.australia.gov.au into 26 HTTP web based XML APIs. These APIs are accessible by the public and support XQuery access including searching, sorting, paging and return compressed XML.
API Summary
API consists of an endpoint URL, an XQuery (_query) parameter, and paging (_start and _howmany) parameters.
eg: http://data.neogopher.com/au/gov/medicareOffices.xml?_query=[XQuery]&_start=1&_howmany=10
Endpoint URL
The endpoint URLs are given in the right-most column of the above table.
Each endpoint may be accessed via HTTP on port 80.
XQuery
The _query parameter defines which information to extract from the data source.
In most cases, a good starting query would be:
for $result in /*/* return $result
However, depending on the XML source data format, it usually makes sense to make the
XQuery's XPath more specialised for better performace. For example:
for $result in /data/sheet/row return $result
would be appropriate for many endpoints.
Tip: You can begin with the more generic XQuery to see that data format first, then specialise from there.
Tip: Each endpoint listed in the above table is hyper-linked to an example URL containing a good starting XQuery for that data source.
Sorting can be achieved by adding an appropriate "order by" clause to the XQuery. For example:
for $result in /data/sheet/row order by $result/cell[@name='Postcode']/@value ascending return $result
will sort on the 'Postcode' field, in ascending order.
See http://www.w3.org/TR/xquery/ for more information on XQuery
Paging
Results can be split into pages by using the _start and _howmany parameters. The _start parameter
specifies which result index to being at (results indexes begin at 1), and the _howmany parameter
specifies the maximum number of results to return.
Putting it all together
So a complete HTTP request might look like:
http://data.neogopher.com/au/gov/medicareOffices.xml?_query=for%20$row%20in%20/data/sheet/row%20return%20$row*_start=1&_howmany=10