/citibike-data-cruncher

Consumes open data from citi bike and generates a nice CSV

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Citibike Data Cruncher

Purpose

This program will consume Citibike trip data and create a friendly CSV showing trips (start or end) in each month of the dataset. The results will show the number of uses of each dock per month. It will count as a usage if the dock is either the start or end of a trip. It will count twice if it is both the start and end of the trip. In my test data, that is a very minimal number of trips.

How to use it

  1. Clone the repo
  2. Install node and npm
  3. npm ci (?) the dependencies.
  4. Replace the station ids in the script with the ones you're interested in
  5. You can find them here
  6. Dowload the months you're interested in from here, unzip them, and put the csvs in the data directory.
  7. npx tsx runner.js
  8. This will take anywhere from a few minutes to an hour depending on how fast your computer is and how many files you're crunching. It can be a lot of data.
  9. Find the results in output.csv file

Example results

Results will look something like this.