-
Notifications
You must be signed in to change notification settings - Fork 16
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
Departure time is outside of the time range covered by currently loaded GTFS data sets #364
Comments
The warning is indicating that a GTFS data set, according to its own metadata, does not cover the requested date and time. Since the result seems to not find any connections, this also seems to be the case. Can you double-check that there are routes in the GTFS data set for the date and time you request? @wklumpen could you comment on this, because I’m not 100% sure of the requirements of a GTFS file |
Heya! We have a known issue (#301) where our warning is not set up to check I assume though that R5 does include it as that would be a pretty big hole in the software. Some more things to check:
If you are able to attach the GTFS file I can double check it to make sure that's not the issue. |
Hello both! Thank you a lot for your answers! According to your advice, I have done the below checks, but I still got the same warning.
Do you have any further advice on how I can solve this problem? Thanks in advance! |
Just had a look at the GTFS file, a quick CTRL+F for |
Also as a side note can you open an issue for the |
Hi, yeah that's true, because the newest Btw, I have just opened the |
Can you post the The
The only way to be sure service is being run on that date is to check the |
Hello, thanks for your reply. As I said in the initial issue description, the GTFS dataset I want to use only has The departure data and time I was trying to request is |
The What's more concerning is the null results. There are a few possibilities:
The last one would be an upstream R5 issue (and is kinda concerning!). One thing you could do is manually create a |
No, we don’t process the GTFS files before passing them to R5 That said, I still think this is a data issue. @keyingtang , could you share the actual GTFS data set you are using? If you want to share it confidentially, please send it to christoph.fink@helsinki.fi |
Okay so for both @keyingtang and @sruinaard I was able to confirm with GTFS-lite that there are trips which run on the days specified. For @sruinaard - Are you getting results when you run or an empty matrix? If so, you can (I think) safely ignore the error as it appears there is service during the period specified. More diagnoses is needed on the other input data to understand why there might be blank matrices. My experience in the past has been one of projection or corrupted input files. |
It looks like the Sweden files have service_ids listed in I also noted that the files provided by both @keyingtang and @sruinaard are nested (folder-in-folder style with a MACOSX folder also). Can you try running the same analysis but just zipping the files directly? I would assume R5 would handle/throw an error while loading but I'm working on eliminating as many possible errors. |
Another possible source of the issue - see this R5 issue Could the base version of R5 we use be causing this issue @christophfink? |
We definitely use a version after the linked issue's fix was merged. That does not mean, however, that we're not affected by something similar I'll take a closer look at our date checking code, maybe there's a convenient way to test whether services exist on the particular day requested, rather than whether the requested date is within the covered period of the GTFS data set Not sure whether we open a(nother) hole in our logic: if there is a GTFS schedule for a service that runs, say, Mon-Sat and is valid for an extended period of time, should requesting a route on a Sunday trigger the warning? |
Thanks for the discussion, I will try running it without the nested structure and let you know how it goes. @wklumpen I'm getting results - the exact same results as walking (descriptives and maps), while I do expect some impact of bus lines. Therefore, I will check next week what is exactly included in the GTFS data for my area and time period, to look more exactly where I'd expect different results. I tried to improve my gtfs files with the r scripts I sent over, and then I did not get the warning anymore, but still, my transit and walking results seemed exactly the same (descriptives). I will also run everything for another area, which is more densely populated and therefore has more public transport, to see if still transit is the same as walking. Keep you posted! |
I think we leave that kind of testing to other packages and remove the date check warning entirely. With that said, the GTFS-Lite 'date_trips()' function does take calendar and calendar date files into account for pulling all trips running on a given date. We could use that but it does require loading the zip which slows the process down for large files. I think if we've checked these particular feeds we should be able to safely say this shouldn't be a GTFS issue, but of course one is never sure. |
Thanks for the discussion!
Regarding this, I have tried just zipping the files directly and running the same analysis, and I got the same error and 'NaN' values in
About this, I checked the projection of my input origins and destinations datasets, CRS of them is |
Hmm. We do try to reproject to 4326 I think (@christophfink) but it's worth a try reprojecting it yourself first and then testing it again |
Yes, I can confirm that r5py transparently reprojects input data and then transforms the results back into the input CRS |
Hi all, We found the reason why the travel time matrices were the same: as we're interested in a rural area, and the public transport service level is low, the median value of travel times almost always returned a result that was the same as walking. We will proceed with using the 5th percentile and a departure time window of 1 hour to capture hourly services. The GTFS files are working for us. Thank you for your time checking things for us! |
@sruinaard thanks for the feedback. Indeed, the way R5 summarises trips over the departure time window is not immediately intuitive. At our lab, we reverted to using the first percentile in a 1h time window for most of our analyses, as we assume - especially in more rural study cases - that people can adapt their everyday mobility demands within these margins (which of course is not necessarily true, but we feel is a valid assumption for certain research) |
Hello, I have a question in terms of the detailed GTFS data requirements.
Describe the bug
I want to use the function
TravelTimeMatrixComputer
, and for thedeparture time
I typed in one time that I'm sure it's covered in the loaded GTFS data sets. But I got warning saying.../r5py/r5/regional_task.py:228: RuntimeWarning: Departure time 2023-10-07 12:30:00 is outside of the time range covered by currently loaded GTFS data sets.
And all the output travel time value areNaN
.The GTFS datasets I provided only has
calendar_dates.txt
, nocalendar.txt
. Could this be a reason?Environment:
The text was updated successfully, but these errors were encountered: