Real-time access to trip data?

81 views
Skip to first unread message

Roy Smith

unread,
Sep 20, 2014, 9:32:34 AM9/20/14
to citibike...@googlegroups.com
I'm thinking of doing something with the data available at https://www.citibikenyc.com/member/trips.  Specifically, I think it would be cool to check to see if I've got an unclosed trip and send me an alert (email, text, whatever) if I do.  Is there a json feed for that data, or am I reduced to screen scraping the HTML and simulating the login form submission to authenticate?


Jesse Chan-Norris

unread,
Sep 20, 2014, 11:14:04 PM9/20/14
to citibike...@googlegroups.com
The only feed that Citi Bike publishes right now is the station feed information. Everything is going to have to be scraped, though to make it at least a little easier, if you look at the source of the trip page, you'll see that each row actually includes the data in data- attributes, so at least it's easier to crawl the dom - just look for .trip elements.

Still, not the easiest situation for what you're looking to do.

jcn

Jason Heiss

unread,
Sep 29, 2014, 2:18:35 PM9/29/14
to citibike...@googlegroups.com
FYI I put together a ruby gem that has code to scrape the trip data (using the data attributes):


--
You received this message because you are subscribed to the Google Groups "BikeNYC and CitiBikeNYC Hackers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to citibike-hacke...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/citibike-hackers/B7FC35B6-141B-4A16-8174-6C420F12D82D%40pith.org.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages