EPIC: As Open Data Hub manager I would like to integrate car pooling services in the v2 OTP instance
Opened this issue · 10 comments
Currently car pooling trips shared by ummadum (currently limited to South Tyrol) are available through the testing environment of the Open Data Hub through this API: https://mobility.api.opendatahub.testingmachine.eu/v2/flat,node/CarpoolingTrip/*/latest
- Implementation of an adapter so to make this data available as GTFS
- Include this feed in https://gtfs.api.opendatahub.com/
- Integrate the feed to the OTP v2 instance
Open Topics:
- It seems that all trips in https://mobility.api.opendatahub.testingmachine.eu/v2/flat,node/CarpoolingTrip/*/latest are single trips(?) Could there be repeating trips and how would these be modeled?
- last updated information: I recommend to only include up-to-date carpool offers in the GTFS/OTP. A repeating offer should have been created/confirmed in the last e.g. 180 days, single trip offers should have their last stop later than current time. All offers in the data hub dataset seem outdated (updated in 2022-08). Is there a service with current data?
- deeplinks: for riders to get in touch with a driver to arrange a ride, we expect a URL (deeplink) to the offer, which currently is not in the data. Can Ummadum trips be opened via deeplinks? Via web or just iOS/Andorid Apps?
- what is the meaning of property „sactive" (seems always to be false), „savailable“ (seems always to be true) „mvalue".“status“ (seems always to be „PUBLISHED“)?
- transfer points: we usually use transit stops and park & ride parkings as potential transfer points. For these, I’d extract transit stops from the GTFS. Are there other data sources to be included, e.g. for park&ride / carpool parkings?
Replies to open topics, relevant for @hbruch:
- Confirmed, we have currently only single trips. Repeating trips are at the moment not considered.
- The right end-point to retrieve ALL single trips (historical + current) is this one: https://mobility.api.opendatahub.testingmachine.eu/v2/flat,node/CarpoolingTrip/*/latest?limit=-1
- Deeplinks: to be checked with ummadum -> @rcavaliere
- sactive = true means in this case that a trip is active, so relevant to be considered (if false, in the past and therefore no more relevant). @dulvui I see however that in the data we have something inconsistent, e.g. trip with ID (scode) = 'cd2beb0dd88ead7a0e16bb41a2221d1d' has sactive = true instead of false;
- savailable = true means trip is openly available through the Open Data Hub (not relevant for you)
- status takes always value = PUBLISHED
- for transfer points, I will prepare a list of relevant P&R infrastructures to be considered in the routing.
@hbruch @leonardehrenfried the Swagger of the Open Data Hub Mobility API, including description of the available fields and filtering options in the API calls, is available here: https://swagger.opendatahub.com/?url=https://mobility.api.opendatahub.com/v2/apispec#/Mobility%20V2
In case of need of further clarifications, please let us know
When requesting only active CarpoolingTrips, I get two trips with sactive=true
, though in the past. Shouldn't they be inactive?
{
"_timestamp": "2024-01-11 04:30:00.086+0000",
"tdescription": "itinerary_details",
"tmetadata": {},
"tname": "itinerary_details",
"ttype": "Instantaneous",
"tunit": "json",
"mperiod": 3600,
"mtransactiontime": "2024-01-04 04:40:07.072+0000",
"mvalidtime": "2024-01-11 04:30:00.086+0000",
"mvalue": {"status": "PUBLISHED", "end_post_code": "39021", "seats_reserved": 0, "start_post_code": "39100", "ride_distance_km": 56.9, "start_lat_approx": 46.49, "start_lon_approx": 11.36, "ride_start_at_UTC": "2024-01-10T16:30Z", "ride_created_at_UTC": "2024-01-03T22:01:18Z", "ride_duration_minutes": 54.0},
"prlineage": "UMMADUM",
"prname": "odh-mobility-dc-carpooling",
"prversion": "c50134a38601c73fa33d95533e1329792eafd065",
"sactive": true,
"savailable": true,
"scode": "cd2beb0dd88ead7a0e16bb41a2221d1d",
"scoordinate": {
"x": 11.36,
"y": 46.49,
"srid": 4326
},
"smetadata": {"end_lat_approx": 46.62, "end_lon_approx": 10.85, "start_lat_approx": 46.49, "start_lon_approx": 11.36},
"sname": "UMMADUM_1",
"sorigin": "UMMADUM",
"stype": "CarpoolingTrip"
}
It seems that value has no UMMADUM specific ID, right? scode
seems to be the datahub Id for the CarpoolTrip, the numeric suffix of sname
could be an ID, but is not unique, so apparently not(?)
@hbruch Thank you for the info! Now I discovered an issue with the datacollector: when no trips are available, the old active ones don't get set to active = false and I will fix this issue asap
@hbruch The issue is fixed now and now no carpooling trips show up anymore with active=true as expected.
@hbruch two updates on my side:
- ummadum has increased the frequency for the update of the trip to 6h (i.e. we have fresh hours every 6 hours, that's the maximum they can do at the moment
- I have an effort estimation for the deep link feature. We are checking how to let this feature implementation takes place
The carpooling integration is now complete and the routes are visible on the new frontend
https://otp-react-redux.opendatahub.testingmachine.eu/#/route/amarillo:ummadum:3999a83091a25bf8e9457934b1b6586a
The carpooling still doesn't show up as options when searching for a trip, but that is related to the frontend, since after a quick check in the code it seems that it doesn't support carpooling yet.
The GTFS file is available here https://amarillo.otp.opendatahub.testingmachine.eu/gtfs/amarillo.altoadige.gtfs.zip
Should I also integrate it to our https://gtfs.api.opendatahub.com/ GTFS API?
@rcavaliere Should @hbruch still participate in the sprint meeting in friday?
@dulvui looks promising!
I will have a deeper look into the work, and how the data conversion into GTFS has been done. After that, let's put the GTFS in our API. In the meantime, set up gtfs.api.opendatahub.testingmachine.eu
@hbruch I don't think your presence is necessary tomorrow, I think we should now check in detail your work and in case let you in case of open points
@rcavaliere I was able now to see a carpooling from CityClinic to Caldaro.
Here the link and a screenshot to the trip
https://otp.opendatahub.testingmachine.eu/?module=planner&fromPlace=46.4704636%2C11.3175522&toPlace=46.41212081413345%2C11.237726211547853&time=6%3A40pm&date=04-11-2024&mode=CARPOOL%2CWALK&arriveBy=false&wheelchair=false&showIntermediateStops=true&locale=en&baseLayer=OSM%20Standard%20Tiles