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

EPIC: As Open Data Hub manager I would like to integrate car pooling services in the v2 OTP instance #174

Open
2 of 3 tasks
rcavaliere opened this issue Jan 19, 2024 · 10 comments
Assignees

Comments

@rcavaliere
Copy link
Member

rcavaliere commented Jan 19, 2024

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
@rcavaliere rcavaliere converted this from a draft issue Jan 19, 2024
@rcavaliere rcavaliere moved this from Backlog to Todo in Open Data Hub OTP Jan 19, 2024
@rcavaliere
Copy link
Member Author

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?

@rcavaliere rcavaliere self-assigned this Feb 9, 2024
@rcavaliere
Copy link
Member Author

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.

@rcavaliere
Copy link
Member Author

@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

@hbruch
Copy link
Contributor

hbruch commented Feb 19, 2024

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(?)

@dulvui
Copy link
Contributor

dulvui commented Feb 21, 2024

@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

@dulvui
Copy link
Contributor

dulvui commented Feb 21, 2024

@hbruch The issue is fixed now and now no carpooling trips show up anymore with active=true as expected.

@rcavaliere
Copy link
Member Author

@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

@dulvui dulvui moved this from Todo to Done in Open Data Hub OTP Mar 22, 2024
@dulvui dulvui moved this from Done to In Progress in Open Data Hub OTP Mar 22, 2024
@dulvui
Copy link
Contributor

dulvui commented Apr 3, 2024

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?

@rcavaliere
Copy link
Member Author

@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 rcavaliere moved this from In Progress to Approved in Open Data Hub OTP Apr 5, 2024
@rcavaliere rcavaliere moved this from Approved to Done in Open Data Hub OTP Apr 5, 2024
@dulvui
Copy link
Contributor

dulvui commented Apr 11, 2024

@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

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants