Giter VIP home page Giter VIP logo

Comments (9)

brendannee avatar brendannee commented on June 3, 2024

You are correct - there isn't support for this yet. Do you have an example GTFS file for an agency that uses frequencies.txt on some routes?

from gtfs-to-html.

nselikoff avatar nselikoff commented on June 3, 2024

Sure, here's one: https://transitfeeds.com/p/san-diego-mts/195/latest/route/AIR

https://transitfeeds.com/p/san-diego-mts/195/latest/download
https://transitfeeds.com/p/san-diego-mts/195/latest/file/frequencies.txt

from gtfs-to-html.

brendannee avatar brendannee commented on June 3, 2024

Great - I pushed an udpate that now displays info about a routes frequency if there is info in frequencies.txt

Give it a try for the San Diego GTFS and let me know what you think.

from gtfs-to-html.

nselikoff avatar nselikoff commented on June 3, 2024

Hey @brendannee thanks for getting this started. So for frequency based schedules, the stop times need to be calculated somewhat differently:

"Actual stop times are ignored for trips referenced by frequencies.txt; only travel time intervals between stops are significant for frequency-based trips. For clarity/human readability, it is recommended that the first stop time of a trip referenced in frequencies.txt should begin at 00:00:00 (first arrival_time value of 00:00:00)."

(From GTFS Best Practices: http://gtfs.org/best-practices/#frequencies)

E.g. it should be start_time from frequencies.txt + arrival_time from stop_times.txt

I would suggest that for horizontal and vertical timetable layouts, all rows/columns should be extrapolated out. With this example data, that will show that the trolley leaves from Palm Street at 12:00am, 12:15am, 12:30am, 12:45am, etc.

And for the hourly layout, it would show
Palm Street | :00 :15 :30 :45
Terminal 1 | :10 :25 :40 :55
etc

What do you think?

from gtfs-to-html.

brendannee avatar brendannee commented on June 3, 2024

Great idea.

I pushed updates to the master branch to better handle the formatting. Now, vertical timetables with frequencies list out all times and hourly shows times for a 60 minute period.

Try out the master branch and let me know what you think.

from gtfs-to-html.

nselikoff avatar nselikoff commented on June 3, 2024

Looking great, thank you for working on this. Couple of things:

  1. Regarding the "Trip times shown below are an example only." text: maybe only show that if exact_times is 0 or empty. If it's 1, don't show that text. (Ref: https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#frequenciestxt)

  2. For consistency, it would be great if hovering over the stops on an hourly timetable highlighted those stops on the map, like vertical and horizontal.

  3. On the hourly layout, I'm wondering if the "minutes after the hour" values should be sorted individually within each cell, e.g. instead of :53, :08, :23, :38, it would be :08, :23, :38, :53 regardless of which came first in the 60 minute period.

I haven't tried it yet, but would the hourly layout also show times for a 60 minute period on a non-frequency based route?

from gtfs-to-html.

brendannee avatar brendannee commented on June 3, 2024

Great suggestions.

  • The current master branch now has code that only shows the frequency warning if exact_times isn't 1.

  • The map effect where stops are highlighted on hover now works for hourly timetables.

  • For the hourly layout, times are now sorted so that for the first stop they are in numerical order like :08, :23, :38, :53. The order stays the same for each trip, so you can still see how long it takes to go between stops. See the last stop of this route
    screen shot 2017-08-20 at 1 36 37 am - the times are not in order so that they line up with the times from the first stop.

  • On the hourly layout, it will now show times for a 60 minute period for non-frequency based routes as well.

Let me know what you think and if I'm missing anything.

from gtfs-to-html.

nselikoff avatar nselikoff commented on June 3, 2024

I think it looks great! Nothing missing that I can see. 👍

from gtfs-to-html.

brendannee avatar brendannee commented on June 3, 2024

Great - I published this as version 0.12.2

from gtfs-to-html.

Related Issues (20)

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.