toddwschneider / nyc-citibike-data

NYC Citi Bike system data and analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NYC Citi Bike Data

Code originally in support of the post "A Tale of Twenty-Two Million Citi Bike Rides: Analyzing the NYC Bike Share System". Also used in conjunction with the nyc-taxi-data repo for the post "When Are Citi Bikes Faster Than Taxis in New York City?"

This repo provides scripts to download, process, and analyze NYC's Citi Bike share system data. The data is stored in a PostgreSQL database, uses PostGIS for spatial calculations, and R for data analysis.

Instructions

1. Install PostgreSQL and PostGIS

Both are available via Homebrew on Mac

2. Download raw bike trips data

./download_raw_data.sh

3. Initialize database and set up schema

./initialize_database.sh

4. Import bike trips data into database and map to census tracts

./import_trips.sh

5. Analysis

Additional Postgres and R scripts for analysis are in the analysis/ folder

Other data sources

These are bundled with the repository, so no need to download separately, but:

Questions/issues/contact

todd@toddwschneider.com, or open a GitHub issue

About

NYC Citi Bike system data and analysis

License:MIT License


Languages

Language:R 79.9%Language:Ruby 11.5%Language:Shell 8.6%