-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Wiesbaden] Data #176
Comments
Hi, here I am. So this may look like: Am I correct? And a question: PS: I've taken this file as an example: |
I've seen a lot of py-files. Looking at the code I found:
Am I right? PS: I'm new to python. |
The project you are referring to seems to be outdated. Also it doesn't use our API. The files relevant for you reside in park_api/cities. I'd recommend you to take a look at For parsing we use beautifulsoup4. I'd advise you to do the same since it is easily powerful enough for the task and already a dependency. About the data the relevant table is accessible via the xpath Another far simpler, but important and time consuming task would be filling the geojson file which needs to be done by hand but only once. The most important information are the coordinates. |
Hi, I'm not only new to Python but also new to Github. I copied the whole project as a ZIP-file, expanded it and modified the file Sample_city.geojson adding all the 14 parking-lots of Wiesbaden. Finally I saved it as Wiesbaden.geojson, locally on my PC. Some questions: |
I'd recommend to check out the GitHub Hello World tutorial and the git tutorial (while GitHub builds upon git, git is a free version control system). There also is a collection of resources that looks like a good start. As for the general workflow, you should fork this repository, do your changes on your on fork and the create a pull request with your changes for us to review.
|
Hi, thanks for the link to 'hello world' on GitHub. I will look at it. Now I have the file Wiesbaden.geojson ready I will check it again, polish it a bit and then open a Pull Request. In parallel I will try to work on the file Wiesbaden.py. |
Thanks! I added a branch |
playing with Python I got this result:
the result, first entry only:
hint: I added the html statically for my test. So I have to add these informations to the data-object and I should be done. Looking into the Sample_City.py I find these lines:
The first 3 lines are the information given above, the rest comes from the geojson-file looked into via the name. PS: I have to check for state and lot.id. |
I added this to my code:
which results in this line: |
I just added the files Wiesbaden.geojson and Wiesbaden.py but I'm not sure that I did it correctly. In the Python-script I added 4 TODOs which describe lines to look for:
Can you please check these lines and also the whole script. |
one error I made: Same for the py-file. Sorry. |
what do I have to do now? Add a new Pull-request against the Wiesbaden-branch? Or do you handle this situation? |
Yes, you have to open a new pull request against the wiesbaden branch. |
OK. I added the files Wiesbaden.py and Wiesbaden.geojson in the cities-directory of the Wiesbaden-branch and did a Pull-request. I hope this is correct now. Unfortunately I added the file Wiesbaden.py to the wrong directory in the first try so please delete this file. And also it looks like I did overwrite the file Sample_city.py with the code for Wiesbaden. Can I correct this? Or do you simply reject the 'modifications'? |
Thanks, that looks better. Since the overwritten |
I will look at the status of the parking-lot over the weekend, then make some changes to the code. I've seen that the data on wiesbaden.de showed the status of 2 parking-lots as closed, I saw this last night. I will try to find out how they do it. |
it looks like there are only minor modifications needed. So I will look for the status, make the needed changes plus the already mentioned modifications and deliver them together. I gues the next version will come on monday. One hint: the word Uhr is included in the following line taken from the file Sample_city.py:
|
This is of course just an example and needs to be adapted to the actual data. |
OK, I got it. Uploading my code to the branch wiesbaden I did encounter 2 problems:
What can I do now? |
there is this: AugustQu/ParkAPI I will add my latest modifications to these files and then make another pull-request. |
so I hope I did it correctly. |
I made some modifications to the py-script and will upload this file later. These modifications were of the type beautifying. But I do see one problem: there is a parking-lot with the name Coulinstraße. On the memo-rheinmain-page it appears as: Coulinstraße, in the geojson-file I added it as Coulinstrasse. In the py-script this will be handled as: How can I handle this? Enter the name in the geojson-file as Coulinstraße? |
I found a typing-error: I will fix this. Put this aside: does the script work? |
Sorry for my late reply, I'm quite busy at the moment.
About ß in street names, they should be usually encoded in UTF-8 that supports those characters. Although if the page doesn't have the correct encoding they will be erroneous. I think we have a solution for this to at least convert those characters to ASCII (@kiliankoe do you remember how we fixed that in other cities?).
Same as above, I can tell when I find time to review (and test ofc.). |
OK. The usual thing: I created some lines and want to see the result immediately..... I've jut added some minor modifications to the two files. One ist the name 'Coulinstraße' in the geojson-file and the other is a bit of cleaning the code in the py-script. |
Thanks for the changes, I reviewed them. There are two stray lines in the geojson that shouldn't be there. If you remove them I think it's ready to be merged. One last thing. There is the If the website changes and the parser breaks (happens usually rarely) we will either try to fix it or (if the fix requires more work) we probably set active_support to false again unless someone fixes it. That what the flag is for. |
I looked into my branch and do not see a file Wiesbaden.py in my master branch, but I do see it in my wiesbaden-branch. And the pull-request is made from AugustQu/wiesbaden against offenesDresden/wiesbaden. Can you please check this again. |
regarding whitespace: my editor here does not show this. And is your system so sensible? |
whitespace: |
Trailing whitespace doesn't necessarily break anything on the running server. But it is at least unclean code which we want to prevent as much as possible and it may break data that spans over multiple lines if ignored. Also it generates changes in files that are no longer easily visible creating different versions of the same software that have no visible change. Example: |
OK. I have used gedit for editing the script but I can switch to eclipse which shows whitespace. Nevertheless this whitespace was entered by copying the lines from my file to the file here..... |
3 simple questions: #1: in the app I've seen lines in green, yellow, red and blue. #2: I've seen texts like 'no data availble'. Will this text appear when my code sets #3: closed parking-lots disappear from the list. Is this the intended behaviour? |
I assume you talk about the Android app which I wrote. I can't tell you about the iOS and Windows apps.
|
I checked the map and it seems to work now, thanks for the fix. |
YES! Looks good. I will write a text in my blog about this app but this will take some time...... |
Yes. And thanks for the explanations. |
another question: in the top-line of the app there is a world-icon. Tipping on it shows some circles in green/red. What is this good for? Should it show the location of the parking-lots via OpenStreetMap? On my Smartphone I only see a background in grey. |
The OpenStreetMap library the app uses requires the permission to store/access local data to store its tiles. Depending on your Android version the app should have asked for that permission. If not you might enable this permission for the app in your system settings. If this permission is not given the tiles sometimes don't show up. The apps source code is available at https://github.com/jklmnn/ParkenDD. So you can take a look at it if you want to (and know how Android apps are built). Unfortunately I don't have the time to maintain the app anymore (I only fix breaking bugs that lead to crashes/incompatibilities with newer Android versions). |
here is the announcement of the availability of Wiesbaden-data on my blog: |
The article looks nice. I have only one issue. The city that is shown after starting the (Android) app is the closest city if location data is available or Dresden if location data isn't available. So for you if you have a location Wiesbaden should be selected by default. |
I finally found some time to write a short tweet: https://twitter.com/parken_dd/status/1127983797667020801 |
Thanks. |
It seems Wiesbaden has moved it's parking information to https://www.wiesbaden.de/leben-in-wiesbaden/verkehr/auto/parkhaeuser.php. The map consists of different parking lots, each linking to their own site with the relevant information. I don't have an idea how we would use this at the moment. I'll reopen this issue and disable Wiesbaden until we find a solution since the old source doesn't seem to be available anymore. |
OK. I will look at it. |
somehow I found this link: https://mobileapps.ffh.de/iphone/parkhaeuser/parkhaeuser.json?city=wiesbaden There are 2 problems with it: it looks like sites like: use the same data-source. |
The data source looks good on a quick view. After all it's JSON so much better than a website. The data difference may be caused by their update intervals (e.g. the data could be 5-10 minutes old which is reasonable for such a difference). We should check that, maybe there is a timestamp to compare somewhere. |
there is a line in the JSON-file saying: statusTime | "21.05.2021, 15:51 Uhr" To me the data looks like very old. I will check this over the day. And I will try to contact someone in Wiesbaden over the weekend. |
ich habe dazu mal etwas geschrieben: |
es sind etliche Monate vergangen, aber am Status hat sich nichts geändert. Hier ist meine Beschreibung samt Kommentar dazu: Ich will dran bleiben. Aber, wie sagt man bei uns im Dorf: da kannste ach em Oxx ins Horn petze. |
From what I saw at least it looks like they aim to provide a working solution in the near future (early next year). Thanks for tracking this! |
Yes, someday they will offer a new solution. Maybe. Btw: currently they have a lot of problems, keyword Salzbachtalbrücke. |
maybe things will change (a big maybe). Please look at this document: https://piwi.wiesbaden.de/dokument/1/2818223 Coming tuesday this event will take place: https://piwi.wiesbaden.de/sitzung/detail/2718746/tagesordnung/oeffentlich We will see whats happening then. I will be there and listen to the discussion. |
Thanks for being so involved! |
Wiesbaden also has parking data available at https://www.wiesbaden.de/leben-in-wiesbaden/verkehr/verkehrsinfos/parken.php.
The raw data seems to be at https://wi.memo-rheinmain.de/wiesbaden/parkliste.phtml?order=carparks. While it looks quite ugly to parse it seems to have all the data we need.
The text was updated successfully, but these errors were encountered: