dgohlke
02-03-2012, 11:55 AM
Capital Bikeshare uses an XML feed to publish data station data. The feed is located at http://www.capitalbikeshare.com/data/stations/bikeStations.xml (updated 1/31/12, old location (capitalbikeshare.com/stations/bikeStations.xml) now redirects)
This feed contains data as outlined below:
<stations lastUpdate="1328289754676" version="2.0">
<station>
<id>1</id>
<name>20th & Bell St</name>
<terminalName>31000</terminalName>
<lat>38.8561</lat>
<long>-77.0512</long>
<installed>true</installed>
<locked>false</locked>
<installDate>1316059200000</installDate>
<removalDate/>
<temporary>false</temporary>
<nbBikes>3</nbBikes>
<nbEmptyDocks>8</nbEmptyDocks>
<latestUpdateTime>1328287786738</latestUpdateTime>
</station>
... additional stations removed ...
</stations>
where:
stations: lastUpdate: a timestamp* of when the XML file was updated
station:
id: a numeric identifier of the station
name: the station's name
terminalName: the terminal #
lat: geographic Latitudinal coordinate
long: geographic Longitudinal coordinate
installed: true or false
locked: true or false, A station can be locked administratively. I think this makes the station inoperable, but it may just prevent bikes from being checked out while still allowing bikes to be checked in.
installDate: a timestamp* of when the station was installed, can be null.
removalDate: a timestamp* of when the station was removed, can be null.
temporary: true or false
nbBikes: the number of bicycles currently docked at this station. I believe it only displays working bicycles (bicycles not marked as needing service).
nbEmptyDocks: the number of currently available docks. I believe it only displays working docks.
latestUpdateTime: This appears to be a timestamp* of when the station last saw activity. This field was added sometime mid-2011. The description has not been officially confirmed**.
* timestamps are 13-digit timestamp (10-digit UNIX timestamp + 3 digit millisecond value)
** The evidence that supports the definition of LatestUpdateTime: The sample data above was captured shortly after 12:22:34 PM on Friday, February 03, 2012 (lastUpdate: 1328289754676). Station 1 contained 3 bikes and 8 docks. The latestUpdateTime for this station was 1328287786738 which equals Friday, February 03, 2012 11:49:46 AM. A look at cabitracker.com on the page for Station 1 at February 3, 2012 (www.cabitracker.com/station.php?id=1&s=2012-02-03&e=2012-02-03) yields a graph that showed that station's status throughout the day. At 11:49 AM the station was reporting 4 bikes and 7 docks, but at 11:50 AM the station was reporting 3 bikes and 8 docks. This time corresponds perfectly with the latestUpdateTime above.
This feed contains data as outlined below:
<stations lastUpdate="1328289754676" version="2.0">
<station>
<id>1</id>
<name>20th & Bell St</name>
<terminalName>31000</terminalName>
<lat>38.8561</lat>
<long>-77.0512</long>
<installed>true</installed>
<locked>false</locked>
<installDate>1316059200000</installDate>
<removalDate/>
<temporary>false</temporary>
<nbBikes>3</nbBikes>
<nbEmptyDocks>8</nbEmptyDocks>
<latestUpdateTime>1328287786738</latestUpdateTime>
</station>
... additional stations removed ...
</stations>
where:
stations: lastUpdate: a timestamp* of when the XML file was updated
station:
id: a numeric identifier of the station
name: the station's name
terminalName: the terminal #
lat: geographic Latitudinal coordinate
long: geographic Longitudinal coordinate
installed: true or false
locked: true or false, A station can be locked administratively. I think this makes the station inoperable, but it may just prevent bikes from being checked out while still allowing bikes to be checked in.
installDate: a timestamp* of when the station was installed, can be null.
removalDate: a timestamp* of when the station was removed, can be null.
temporary: true or false
nbBikes: the number of bicycles currently docked at this station. I believe it only displays working bicycles (bicycles not marked as needing service).
nbEmptyDocks: the number of currently available docks. I believe it only displays working docks.
latestUpdateTime: This appears to be a timestamp* of when the station last saw activity. This field was added sometime mid-2011. The description has not been officially confirmed**.
* timestamps are 13-digit timestamp (10-digit UNIX timestamp + 3 digit millisecond value)
** The evidence that supports the definition of LatestUpdateTime: The sample data above was captured shortly after 12:22:34 PM on Friday, February 03, 2012 (lastUpdate: 1328289754676). Station 1 contained 3 bikes and 8 docks. The latestUpdateTime for this station was 1328287786738 which equals Friday, February 03, 2012 11:49:46 AM. A look at cabitracker.com on the page for Station 1 at February 3, 2012 (www.cabitracker.com/station.php?id=1&s=2012-02-03&e=2012-02-03) yields a graph that showed that station's status throughout the day. At 11:49 AM the station was reporting 4 bikes and 7 docks, but at 11:50 AM the station was reporting 3 bikes and 8 docks. This time corresponds perfectly with the latestUpdateTime above.