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

Option to automatically remove empty rows #90

Closed
campagnaagtt opened this issue Sep 19, 2020 · 10 comments
Closed

Option to automatically remove empty rows #90

campagnaagtt opened this issue Sep 19, 2020 · 10 comments

Comments

@campagnaagtt
Copy link

campagnaagtt commented Sep 19, 2020

We've notice that there are not present an efficient algorithm to merge the nodes of all route's branches in one merged with a correct sequence. So we putting all nodes for all branches in the timetable_stop_order ordered by branches length. Would be helpful remove all empty rows (means with not transit time) on a timetable. You can do it by a true/false option.

@brendannee
Copy link
Member

Could you share with me a link to your GTFS and the timetable_stop_order.txt you are using so I can see the empty rows you are talking about?

@campagnaagtt
Copy link
Author

campagnaagtt commented Sep 20, 2020

Hello, here you can download our GTFS:
http://www.gtt.to.it/open_data/gtt_gtfs.zip

Try to use the timetable files attached with route 1085E and all nodes puts in the timetables_stop_order file.
I applied a possibile fix in node_modules\gtfs-to-html\views\timetable\timetablepage_full.pug:
block extraHeader
script(src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous")
if config.removeEmptyRows
script.
$( document ).ready(function() {
$('tr').filter(
function(){
return $(this).find('td.stop-time').length == $(this).find('td.skipped').length;
}).not(':first').hide();
});

If not use the timetable_order file, the logic of keep nodes it wrongs.
Thanks a lot for your support.
Regards

@campagnaagtt
Copy link
Author

campagnaagtt commented Sep 20, 2020 via email

@brendannee
Copy link
Member

Can you upload the timetable_stop_order.txt file you are using to this github issue so I can try building the timetables?

@campagnaagtt
Copy link
Author

campagnaagtt commented Sep 21, 2020 via email

@brendannee
Copy link
Member

Thanks,

I checked out the timetables that are getting generated using the GTFS and timetable_stop_order.txt.

Since you are specifying the stops to be displayed in timetable_stop_order.txt, you can just exclude any stops which have no timepoints from timetable_stop_order.txt. I made an updated timetable_stop_order.txt which removes all of the stops which didn't have stop times from that route - you can grab it here timetable_stop_order.txt

and it generated

Screen Shot 2020-09-20 at 11 35 30 PM

@campagnaagtt
Copy link
Author

campagnaagtt commented Sep 21, 2020 via email

@brendannee
Copy link
Member

You should be able to put in the full list of stop_ids in timetable_stop_order.txt so that all stops with timepoints show up on the timetable, in the order that you want them to show up. You may need to add more stops to timetable_stop_order.txt so that the timetable is complete. For routes where all trips make exactly same stops, you don't need to specify stops in timetable_stop_order.txt.

Can you share with me your modifications for putting dayList in the tripName?

@brendannee
Copy link
Member

I pushed an update to the documentation to better explain the purpose of timetable_stop_order.txt file https://gtfstohtml.com/docs/timetable-stop-order. Check it out and let me know if you have suggestions for how to make it easier to understand.

@brendannee
Copy link
Member

Closing this issue - feel free to reopen or comment as needed.

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