On a recent trip to Nottingham my mind was racing. As usual. I was thinking about how under-utilised my tube data set was. It'd been used in the tube walk page, which describes the duration of every tube journey if taken on foot. But it only got a few retweets, a couple of favourites, and not much else.
So I created an API to expose the data to the rest of the world, in the hope I'll get more!
The URL stub is:
http://marquisdegeek.com/api/tube/
These are filters, and are combined using the 'AND' operation. i.e. all filters must conform.
name | Filter by name |
zone | Filter by zone |
long/longitude | Filter by longitude, within a given distance |
lat/latitude | Filter by latitude, within a given distance |
distance | The distance to used when filtering by long/lat, in meters |
sortby | Sorting parameter. Can be name, zone, longitude, latitude or distance (only if filtering by long/lat) |
sortorder | If provided, must be 'asc' or 'desc', and orders the parameters in 'sortby' |
Find the most easterly stations:
http://marquisdegeek.com/api/tube/?sortby=longitude&sortorder=desc
Or north-most stations in zone 1:
http://marquisdegeek.com/api/tube/?sortby=latitude&sortorder=desc&zone=1
Or the closest to the meridan, sorted by distance
http://marquisdegeek.com/api/tube/?long=0&lat=51.50&distance=1000&sortby=distance
Or the closest to the meridian, ignoring the latitude:
http://marquisdegeek.com/api/tube/?long=0&distance=1000&sortby=distance