

IPython notebook to play with Citi Bike data - paddy_m
https://www.wakari.io/sharing/bundle/paddy/citi_bike

======
paddy_m
This is a very simplistic notebook. I just wanted to play with the data a bit.
There are about 250 data points included in the bundle. I would love to see
what else people will do with the data and notebook.

~~~
JeffJenkins
Where does the data come from? The "System Data" on the website doesn't have
anything yet

~~~
paddy_m
import json def bikes_available_for_set(stats): available_count = 0 for s in
stats['stationBeanList']: available_count += s['availableBikes'] return
available_count

def currently_available_bikes(): !curl <https://citibikenyc.com/stations/json>
> latest.json stats = json.loads(open("latest.json").read()) available_count =
bikes_available_for_set(stats) print "there are currently %r bikes in
stations" % available_count currently_available_bikes()

That's the code block that I use to figure out how many bikes are currently
available. I pull from stations/json url.

~~~
JeffJenkins
Thanks! This is awesome.

------
runjake
For others as confused as I was, Citibike is apparently a (NYC-based?) bicycle
sharing service.

<http://citibikenyc.com>

~~~
topherjaynes
Right, it's literally just rolling out as it's in beta at the moment and opens
full time in June for non-year members. It's going to be some interesting data
as it's NYC's first bike share program. Looking forward to some cool
visualizations!

