Coder Social home page Coder Social logo

gobike's Introduction

GoBike Data

This project visualizes data about the Ford GoBike network. The data is available here: https://bikeshare.science.

Trip Data

Trip data is downloaded from https://www.fordgobike.com/system-data and should be placed in the data directory. Once downloaded, the directory should look like this:

$ ll data
total 1309768
drwxr-xr-x  11 kevin  staff   352B Aug 14 01:08 .
drwxr-xr-x  22 kevin  staff   704B Aug 19 20:09 ..
-rw-r--r--@  1 kevin  staff   112M Aug 12 02:44 2017-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    19M Aug 12 02:44 201801-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    22M Aug 12 02:44 201802-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    23M Aug 12 02:44 201803-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    27M Aug 12 02:44 201804-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    36M Jun  8 08:08 201805-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    40M Jul 16 11:40 201806-fordgobike-tripdata.csv
-rw-r--r--@  1 kevin  staff    40M Aug  7 12:01 201807-fordgobike-tripdata.csv

This is a prerequisite for building the site.

Static Site

All of the pages are static pages that are checked in to Git. Run make site to regenerate the HTML pages.

Testing

Run make test to run the test suite.

Polygons

The polygons are kind of a pain. Use geojsonlint to check whether your polygons are okay. They need to be in a particular order.

Run the rewind script to rewind the polygon order.

Datasets

In addition to server, we've made the Ford GoBike datasets available online.

BigQuery

All trip data lives in the ford_gobike dataset, which is available publicly.

Trips per week
SELECT
  DATE_TRUNC(DATE(start_time), WEEK) as week,
  COUNT(*) as trips
FROM `bay-area-public-data.ford_gobike.trips`
GROUP BY 1
ORDER BY 1
Unique bikes per week
SELECT
  DATE_TRUNC(DATE(start_time), WEEK) as week,
  COUNT(distinct bike_id) as bikes
FROM `bay-area-public-data.ford_gobike.trips`
GROUP BY 1
ORDER BY 1
Average trips per bike per week
WITH bike_trips AS (
SELECT
  DATE_TRUNC(DATE(start_time), WEEK) as week,
  bike_id,
  count(*) as trips
FROM `bay-area-public-data.ford_gobike.trips`
GROUP BY 1, 2
ORDER BY 1
)

SELECT week, avg(trips)
FROM bike_trips
GROUP BY 1

gobike's People

Contributors

kevinburke avatar kyleconroy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gobike's Issues

Generate stats on parking turnover

How often does the average SF parking space turn over, e.g. how many cars can park in it in a day?

How often does the average Gobike dock turn over?

Female ridership tracking

For Ford GoBike, currently female ridership is approx 26%.

As SF installs safer bike lanes and bike share spreads throughout the city, we're hopeful to improve this number and get more women biking.

Is it possible to had a graph that shows the breakdown of gender (Male / Female / Other)?

Add disclaimer

We should put a small thing at the bottom that says "this project is not affiliated" etc.

Add the smaller cities

GoBike is also live in Emeryville, Redwood City, etc. We should add data for those & add the slugs similarly.

Auto-download new CSV's

If Motivate uploads a CSV for a month we should have a script to auto-download it and place it in the data directory.

Generate simple revenue model

This is complicated since there are quite a few different pricing schemes. Estimate revenue per rental (maybe search public data)? and use it to build data about run rate, profitable vs. unprofitable docks.

Bonus credit: compare to on-street parking at the same locations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.