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

Add Jena #246

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Add Jena #246

wants to merge 1 commit into from

Conversation

Mola19
Copy link

@Mola19 Mola19 commented Jan 1, 2024

Jena has a very comprehensive api, which is split up into several sources.
https://opendata.jena.de/dataset/parken

Some files say they are only for testing, but they reflect the data shown on the website
https://mobilitaet.jena.de/de/parken

To get all necessary data, two sources are required (one xml file for the current occupancy data and one json file for general parking lot data). This currently doesn't not fit how api works, so one of them is fetched in the code.

Beautiful Soup can't parse the xml file with "html.parser", it needs an actual xml parser (lxml is the only Soup supports), so i added this as a dependency (it requires these apt packages: libxml2-dev libxslt-dev python-dev).

Also since the json api returns all necessary geodata, not much data is needed in the geojson. I can add it though if you want it anyway (there is also a comprehensive geojson file in the api).

I have one question though: the documentation states, that free is an optional field for a lot, but the tests fail if it doesn't exists and if it is None the comparison with total fails. So is it optional or not?

Currently it only takes lots where the free lots are known, but in both cases i would probably restructure the code a bit

@hbruch
Copy link
Contributor

hbruch commented Jan 2, 2024

Dear @Mola19, thank you very much for your contribution. May I direct you to the ParkAPI2-sources project, which will replace ParkAPI in a few weeks. If you don't mind to update the Jena scraper there, this would be great!

Thank you!

And I'll add a note to this project, so others are guided to the new project, also.

@Mola19
Copy link
Author

Mola19 commented Jan 3, 2024

Ok, i opened a pull request there (#246 (comment)). Should i close this pr?

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