Skip to content
Python API and analysis of Chicago's bikeshare
Jupyter Notebook Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
divvydata
img
nb_utils
tests
.gitignore
.travis.yml
LICENSE
Pipfile
Pipfile.lock
README.md
notebook.ipynb
requirements.txt
setup.py

README.md

Divvy Data

MIT Travis PyPI View on YouTube

About

Divvy Data is a package to access historical and live Chicago bikeshare data.

I used this data to blog about Chicago biking and data visualization. See my analysis notebook on nbviewer.

Set up

pip install divvy-data

Usage

Historical Data

import divvydata

# gather historical data over all years
rides, stations = divvydata.get_historical_data(
    years=[str(yr) for yr in range(2013,2019)],
    rides=True,
    stations=True
)

Live Data

import divvydata

sf = divvydata.StationsFeed()
df = sf.monitor_event_history(runtime_sec=60)  # also saves to sf.event_history attribute

# filter to stations that received interactions
df = df.loc[df['id'].duplicated(keep=False)]

Data Usage Limitations

This package does not host or directly provide data, except as cited in analysis notebooks. When using Divvy data, follow Divvy's Data License Agreement.

You can’t perform that action at this time.