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

VRN Realtime Pull Converter: Park and Ride #137

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AbdullahiFatola
Copy link
Collaborator

This PR integrates the Park and Ride realtime data from Verkehrsverbund Rhein-Neckar GmbH. The converter pulls static data made available via a URL, and the realtime data are pulled from Multiguide API and Sonah API, and bundled together.

import_parking_site_exceptions: list[ImportParkingSiteException] = []

response = requests.get(
url='https://spatial.vrn.de/data/rest/services/Hosted/p_r_parkapi_static/FeatureServer/5/query?where=objectid%3E0&outFields=*&returnGeometry=true&f=geojson',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is too long

for feature_input in feature_inputs:
static_parking_site_inputs_by_uid[str(feature_input.properties.vrn_sensor_id)] = feature_input.to_static_parking_site_input()

for realtime_vrn_p_r_input in realtime_vrn_p_r_inputs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it by purpose that you ignore all datasets which don't have realtime data?

parking_site_uid = str(realtime_vrn_p_r_input.uid)
if parking_site_uid in static_parking_site_inputs_by_uid:
# Update realtime data with only parking places having static data
realtime_vrn_p_r_input.uid = static_parking_site_inputs_by_uid[parking_site_uid].uid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you do it this way?

@AbdullahiFatola
Copy link
Collaborator Author

AbdullahiFatola commented Oct 24, 2024

The Verkehrsverbund Rhein-Neckar wants to bundle the data sources and make it available via one Interface (their GIS-System), which conforms with Open Data License Germany. Therefore, Instead of pulling data from 3 different data providers' APIs (as it is currently programmed in this converter) only one data source will be used.

I will suspend the development of this converter till November when the new real-time interface will be ready.

@the-infinity
Copy link
Contributor

Please keep in mind to rebase it as soon as it gets ready, as there was a ruff update which changed formatting rules.

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

Successfully merging this pull request may close these issues.

2 participants