Bicycle sharing system (BSS) research, beyond the analysis of individual systems, requires copious data gathering and parsing. Bike Share Research (BSR) aims to facilitate the curatation of BSS data through a collaborative and open data platform while making it API accessible.
While there exists many definitions for a bicycle sharing system (BSS), we define it as being an autonomous system of accessible bikes that can be used for one way trips between stations or points within an area. While many BSS use stations with docks to lock bicycles, this is not necessary for our definition. The system must allow one way trips however, trips that end at another point than that at which it started.
Get all the data for one BSS:
bikeshare-research.org/api/v1/systems/boston
Get the list of one category for all BSS, in this example the base information:
bikeshare-research.org/api/v1/categories/base
You can specify one field of a category for all BSS, in this example the brand name:
bikeshare-research.org/api/v1/categories/base/fields/brand
Or multiple fields:
bikeshare-research.org/api/v1/categories/base/fields/launch_date,close_date
Or just for one system:
bikeshare-research.org/api/v1/categories/base/fields/brand/systems/vancouver
Get the list of BSS in one country:
bikeshare-research.org/api/v1/locations/france/ bikeshare-research.org/api/v1/locs/france/
See all the field and category names in the section Category fields below.
If you have a large amount of data that you would like to share, rather than entering it manually you may submit using the API.
As this is potentially lethal to the entirety of the data set, it is locked. Please make contact if this is something you would like to do.
Once an apikey is provided you can submit, edit and delete data using POST, PUT and DELETE HTTP methods respectively.
This can be particularly usefull for sharing statistics:
https://bikeshare-research.org/api/v1/systems/boston/cats/tech/apikeys/0123456789/ (POST)
Updating a records can be done by specifying the row, category and bssid:
https://bikeshare-research.org/api/v1/records/75/systems/washingtondc/cats/operators/apikeys/0123456789/ (PUT)
If you wish to delete data provide the specific record endpoint:
https://bikeshare-research.org/api/v1/systems/boston/cats/tech/records/8/apikeys/0123456789/ (DELETE)
Stations data is not editable. It is automatically populated by monthly calls using the provided parsers.
Required fields are denoted with an asterisk.
Parsers provide the translation of BSS data feeds, which have different structures, information and request parameters, to a standard output defined by schemas. The parsers are hosted on the github repository. There exists a variety of schemas (output formats) from which to select. To contribute new parser or schema make a pull request on github.
Our parser is still primitive, we recommend using PyBikes in the meantime. Note the PyBikes BSS id in the BSR base category.
The goal of the github parsers, in conjuntion with the BSR data, is to make data feed requests extremely simple. Here are a few examples:
import urllib2, json from bsrp import BSRParser # Grab the feed we desire chicago = urllib2.urlopen('http://bikeshare-research.org/api/v1/categories/data/systems/chicago') # There may be multiple feeds in the list, let's use the first one chicago_data_feed = json.loads(chicago.read())[0] # create instance of parser parser = BSRParser(chicago_data_feed) # save Chicago's Divvy station data locally parser.save('some/path/to/save/data/') # done
# We can specify a static record rather than a 'live' one as was done in the above example lyon = urllib2.urlopen('http://bikeshare-research.org/api/v1/categories/data/records/10') # Retrieve the first item in feed list lyon_data_feed = json.loads(lyon.read())[0] parser = BSRParser(lyon_data_feed) # set the api key that is required, save the raw data as well as the formatted parser.set_apikeys('YOUR JCDECAUX API KEY').save_raw('some/path/to/save/raw_data/').save('some/path/to/save/data/')
There already exists many online resources for BSS information and data gathering, yet none provide comprehensive structured data required for the many fields of BSS research.
Here are some good existing resources:
BSR utilizes many existing resources to provide data in a structured form to more easily be compared, extracted and analyzed.