eskerda / pybikes

bike sharing + python = pybikes
https://citybik.es
GNU Lesser General Public License v3.0
551 stars 167 forks source link

Add Tokyo's "Docomo Cycle" #286

Closed nicolas-raoul closed 11 months ago

nicolas-raoul commented 6 years ago

URL: http://docomo-cycle.jp/tokyo-project/ This URL contains a map that shows bike stations, so I guess information can be extracted from that.

The bicycles are separated in "communities" such as "minato" or "chiyoda", I am not sure whether they should be considered different systems or not. A dozen other cities use the same provider, presumably powered by the same technology. I added all to https://github.com/eskerda/pybikes/wiki/Missing-bike-systems I can translate from Japanese whatever you want, just ask me.

There used to be an Android app that showed how many bikes are available at each station, but it seems to have been retired, now it seems that users are requested to use the website.

Thanks a lot for maintaining this project! :-)

reustle commented 5 years ago

Hey, could you please clarify which app you are talking about? I'm guessing it is only available in the Japanese app store?

nicolas-raoul commented 5 years ago

@reustle

Extract from the README of this project:

pybikes provides a set of tools to scrape bike sharing data from different websites

The above URL is just that: A website from which bike sharing data can be scraped. No need for any app :-)

reustle commented 5 years ago

Okay, you said "Android app" so I wanted to clarify since I haven't found any native apps. Thanks!

nicolas-raoul commented 5 years ago

@reustle oops I did not remember that, I edited the issue :-) Thanks!

nicolas-raoul commented 5 years ago

On the opposite, I can confirm that the bicyles are still present and used by many :-)

markszabo commented 5 years ago

I've recently moved to Tokyo and using Docomo Cycle ever since. The website has limited information (only an embedded Google Maps with the stations and no information on the available bikes per station), but their android app(only available from Japan I guess) has the data on the individual bikes per station. I'll keep looking into the communication of the app to figure out their API. I'll keep you posted here.

reustle commented 5 years ago

I currently host station data on https://TokyoBikeShare.com (which is currently not running, back online soon). looking forward to hearing more about what you find on their API :)

markszabo commented 5 years ago

This is what I got sofar: https://repl.it/repls/AllEssentialBrackets

The output can be copied into an HTML file to draw the stations to a map: https://jsfiddle.net/r1pxda2m/

(Files are also attached for later reference should the above URLs die: docomo1.zip)

The colors on the map:

The later 2 needs additional investigation. I suspect they are places to buy the pass or something similar.

Is the code of your site available somewhere? I would be interested in which APIs do you use :)

nicolas-raoul commented 5 years ago

I ran the script a little bit, it seems to work :-)

While trying to figure out what the red/gray points are, I found out that many of the stations seem to be off from the center of each green circle. Maybe I should not look at a circle's center but rather at one of its corners? Or maybe Docomo's data is just not very accurate, or it is making up for some offset in the official client?

Some of the red circles:

So maybe the red dots are either kiosk with no bicycles, or actual stations that are temporarily closed?

reustle commented 5 years ago

I also pulled the pins from their website, and had to clean up a bunch of them. I am happy to open source tokyobikeshare.com, I'll finish cleaning it up a little bit and try to implement the script above as a celery job. I'm currently using a web scraper :-)

markszabo commented 5 years ago

Hm, the location should be the middle of the circle (at least based on the coordinates I got from the site). Here is the same map with smaller circles: https://jsfiddle.net/c039nrLt/ the stations I use seems to be where they appear on the map.

Compared to scraping the website, my solution has the drawback of using the API used by the mobile app, so if they decide to update the API and they are willing to not accept connections from outdated apps, then they can easily break these calls. Some of the calls actually contain the app version and some others a constant aplcode which is hardcoded into the app.

nicolas-raoul commented 5 years ago

@markszabo Thanks! Some of the points definitely seem off by like 10 meters, or it might be an OpenStreetMap shift.

markszabo commented 5 years ago

Oh, that's interesting. Btw I have grabbed some extra info on the gray and red dots: https://markszabo.github.io/grays.html and https://markszabo.github.io/reds.html

Most of them seem to be points where passes are sold (e.g.【1日パス販売窓口 in the name)