Files
shiny-app/geoparser.py
2025-12-07 15:58:01 +01:00

26 lines
655 B
Python

import json
import os
from collections import defaultdict
os.chdir("C:\\Users\\milli\\Documents\\Datenbereinigung")
bezirk_table = defaultdict(dict)
with open("geobezirke.json", "r", encoding='utf-8') as file:
data = json.load(file)
for entry in data["features"]:
bezirk = entry["properties"]["bezirk"]
if bezirk not in bezirk_table:
bezirk_table[bezirk] = []
bezirk_table[bezirk].append(entry["properties"]["jahr_date"])
print(len(bezirk_table))
for bez in bezirk_table.keys():
print("----------")
print(bez)
for date in sorted(bezirk_table[bez]):
print(date)
print("---------")