Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork for own city #1

Open
janpio opened this issue Dec 8, 2017 · 7 comments
Open

Fork for own city #1

janpio opened this issue Dec 8, 2017 · 7 comments

Comments

@janpio
Copy link

janpio commented Dec 8, 2017

I am looking into forking this for my city (Berlin).

I found an equivalent to what you have in google_transit.zip (although I have to filter it down as it also contains busses, trams, regional trains, ...).

What about schedules/?

Anything else missing besides running the commands you listed in README?

PS: Nice project by the way!

@nate-parrott
Copy link
Owner

Hi there! /schedules is actually generated by gtfs_json.py. You might need to modify the paths in that file a bit, but it shouldn't need to many changes!

@nate-parrott
Copy link
Owner

(make sure to unzip your google_transit.zip file in the directory before running the script)

@janpio
Copy link
Author

janpio commented Dec 9, 2017

Thanks!
Will do and let you know how it goes.

@janpio
Copy link
Author

janpio commented Dec 21, 2017

Finally got to it.

This is my data source: http://www.vbb.de/de/download/GTFS.zip
Some information about it: https://transitfeeds.com/p/verkehrsverbund-berlin-brandenburg/213

generate_routes_json.py:

  • 8 MB routing_graph.json
  • 1 kb subway.json :(

I also had to edit line 178 to this:

    if not xfer['min_transfer_time'] == "":
        time = float(xfer['min_transfer_time'])
    else:
        time = float(0)

Seems some min_transfer_time are missing in my dataset.

gtfs_json.py:

  • 4 Gig of RAM, needed to install 64bit python (Windows)

  • schedules/transfers.js is 3.5Mb
  • all the other files in schedules are 1kb :(

I would be happy with part of the data, but don't know how to filter the dataset locally: https://transitfeeds.com/p/verkehrsverbund-berlin-brandenburg/213/latest/routes?type=400

Any pointers or ideas to any of my issues?

@janpio
Copy link
Author

janpio commented Dec 21, 2017

@janpio
Copy link
Author

janpio commented Dec 21, 2017

Generating the schedules still doesn't really work, but the other files look good.

Let's try if it can render something:

  • rename subway.json to subway.js
  • add subway = at the beginning of the file
  • update map.js: let defaultStop = '127'; // times sq (line 33) and replace "127" with one of my stops

Whee I see something!

  • Map seems to be rotated 15-20 degree counter clockwise

@janpio
Copy link
Author

janpio commented Dec 22, 2017

So I got it working for the default loading state:
https://janpio.github.io/subway/

Compare this to Google Maps:
https://www.google.de/maps/@52.5183954,13.4724959,10.56z/data=!5m1!1e2
(only the green lines are in the data set right now)

See my commit for the changes that were necessary:
https://github.com/janpio/subway/commits/master
And some notes and research at the end of the README:
https://github.com/janpio/subway/commits

Now on to fix the schedule stuff...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants