Home

Awesome

bikeshares

Bicycle-sharing services publish trip-history data in a variety of layouts and represent common variables, such as the rider's gender, in disparate ways. bikeshares, a Python library, standardizes this data. Currently supporting:

Installation

pip install bikeshares

Usage

bikeshares assumes you have already downloaded trip history and/or station data from the bikeshare services themselves. The bikeshares parsers read these files, and convert their data into a standardized set of fields. See Fields for details. Example usage:

from bikeshares.programs.chicago import Divvy
divvy = Divvy()

divvy.load_trips("path/to/trips.csv")
divvy.load_stations("path/to/stations.csv")

trips_per_station = divvy.trips.by_station()

Methods/Properties

Each supported bikeshare service has its own Python class. Each of those classes has two main methods:

Both methods expect the main CSV files published by the bikeshare services themselves as their first (and, typically, only) argument. Each program also has two main properties:

Fields

Trips contain the following fields:

Stations contain the following fields:

Bikeshare Services Currently Supported