There’s a bit of a confusion in documentation on how to write the AGS correctly.
sometimes I see it with trailing 000000, sometimes just the first five characters.
The JSON nevertheless for “Landkreis Region Hannover” is here:
so, using 032410000000 in the current version on github should do the trick.
one thing is, that there’s no instance ov “Covid”, but “Corona” and then it’s only in the descriptive texts, and then also there’s different spellings:
So, you could
search for “Corona” and drop the information also. I’d like to have all warnings sorted out, if like e.g. the local government decides for new means for containing the spread.
But you could do something along the lines of
- inserting a function to search in a python dictionary:
def search_in_dict (values, searchterm):
for k in values:
for v in values[k]:
if searchterm in v:
- inserting the search in (current) line 91
if (announcementJSON[j]["identifier"] == meldewert):
if (search_in_dict(announcementJSON[j], "Corona" == False):
JSONreturn[i] = announcementJSON[j]
j = j+1
so, the if-clause should find “False”, if there’s no “Corona”, meaning it will add the warning to the JSON, and True, if there’s Corona in there and then do nothing. But it’s untested!