Closed stephaneghozzi closed 3 years ago
Doing this in python looks quite simple and effective. Both of the tools use the same descriptor file to interact with the service. Before including the code, however, we need to reach out to the owner of the repo as no License is specified for the code.
Good point... A bit a question of what is done in R and what in Python... But that doesn't really matter if the code is modular :)
I think we could run the python script in the very beginning to store the data as CSV and then spin up R. Also I found a way to super conviniently call R from python rpy2, it is really an amazing piece of software. I already used it for SORMAS-Stats, just in case we need it.
Good point on a missing license ... i have also (uncommitted) scripts for Landkreise (#23) ...
Just added a BSD license (https://github.com/rgieseke/opencoviddata/commit/2f2824672e9c5e6128c02fc599af8a7a891c2ed9)
😮 and I was there writing a long email... Thanks! 🙏
Cheers! Pushed the county script as well so you have that too. I think i remember there was someone on Twitter who said they have an (unpublished) R-wrapper for SurvStat but these Python scripts to CSV are probably self-contained enough that you can get them to run if you want (or re-do the API calls in your favourite environment). The state version has run pretty well in the daily GitHub CI action.
@rgieseke That's awesome! Thank you so much :)
yes... I think I saw the tweet and but couldn't find it afterwards... (Thing is, former colleagues at RKI did develop such solutions, but we could never determine whether it was ok to make them publicly available... a real shame...)
Yeah ... i mean technically it is sort of self-documenting (https://tools.rki.de/SurvStat/SurvStatWebService.svc?wsdl) but a lot i had to figure out from looking at the field names in the website ...
we'll try and extend it to dimension "Falldefinitionskategorie" and possibly age group and sex, but that shouldn't be a problem given all you've done already
If anything is missing, I'm happy to contribute back :D
I drop you both a mail :)
Thank yo us much :)
@rgieseke I sent an email to the email address linked on your GitHub profile
Continued in #27
At the moment there are two data sources: RKI's corona dashboard and RKI's SurvStat. The first is already queried automatically, the second however has to be downloaded manually, although there is a web service https://tools.rki.de/SurvStat/SurvStatWebService.svc, which however is a bit tricky to use. See https://github.com/rgieseke/opencoviddata and in particular https://github.com/rgieseke/opencoviddata/blob/main/scripts/fetch-state.py for a Python implementation.