ipeaGIT / r5r

https://ipeagit.github.io/r5r/
Other
178 stars 27 forks source link

trying to map accessibility and Detailed_itineraries function does not return travel mode "transit" #375

Closed Shon2477 closed 6 months ago

Shon2477 commented 7 months ago

Dear r5r developer team,

I am trying to study the accessibility of social services in Budapest by public transport, but I cannot seem to get the different functions within the r5r envirnment to include transportation mode other than walking. Here is a documentation of the issue: https://github.com/Shon2477/r5r-Timezone_issue.git

Can you please help with the issue or guide me in the right direction how to resolve this? Thanks for any help in advance.

Timezone_issue.md

Please let me know if this it the correct format of the report.

Best, Gergely

rafapereirabr commented 7 months ago

This is likely related to question 6 in our FAQ.

the link to the GTFS seems to be broken in your documentation

Shon2477 commented 7 months ago

By the link to the gtfs you mean the gtfs file itself?

Shon2477 commented 7 months ago

If I interpret this correctly since the routing algorithm is different is it possible that while detailed_itineraries only returns walk as a mode of travel other functions such as accessibility is taking public transport into account as well?

rafapereirabr commented 7 months ago

By the link to the gtfs you mean the gtfs file itself?

Yes, I cannot download the GTFS fle with the link shown in timezone_issue.md

rafapereirabr commented 7 months ago

If I interpret this correctly since the routing algorithm is different is it possible that while detailed_itineraries only returns walk as a mode of travel other functions such as accessibility is taking public transport into account as well?

it's possible, but unlikely.

In case you'd like to check it, you might wanna use the expanded_travel_time_matrix() function. See vignette for details.

Shon2477 commented 7 months ago

This is the link for the gtfs file of Budapest. https://opendata.bkk.hu/data-sources When running the expanded_travel_time_matrix() function no matter how I specify the mode of transport between the origin destination pair it does not want to return transit as a mode of getting from origin to destination. Although it does return correct results for transport mode "CAR" or "BICYCLE". I have uploaded the RMarkdown to include the ettm functions as well. Timezone_issue.md. Could this mean that there is some issue with the gtfs file itself?

rafapereirabr commented 7 months ago

I have now downloaded the GTFS from the link you shared. The GTFS feed does not include a calendar.txt file. Afaik, this file is essential because it tells R5 the period during which transit services would be operating.

suggestion: Try manually including a calendar.txt file that includes start_date and end_date between 20240301 and 20240331, which seems to be the reference period in the calendar_dates.txt file.

Also, make sure to update your departure_datetime to a date within this period.

Shon2477 commented 7 months ago

I have downloaded the newest version of the gtfs and have created the calendar.txt from calendar_dates.txt in a way that is in the updated RMarkdown . However when reinitialising the r5r_core object, respecifying the departure_datetime and running the detailed_itineraries and the ettm functions again it still only returns results with "WALK" as the only mode of transport.

rafapereirabr commented 7 months ago

If you simply run r5r_core <- setup_r5(data_path = your_data_path), then {r5r} will load to memory the network that was previously built. You need to either delete the network.dat file from your data path or set overwrite = TRUE. Like this.

r5r_core <- setup_r5(data_path = your_data_path, overwrite = TRUE)

rafapereirabr commented 6 months ago

@Shon2477, any update on this?

Shon2477 commented 6 months ago

Yes, it works now thank you very much for all the help I am eternally grateful. I have some further questions regarding visualisation . I have sent an email with the details.