add conversion script

This commit is contained in:
Robbe Van Herck 2020-05-13 17:16:21 +02:00
parent a320a459dc
commit bbcae0e02b

26
blokmap_to_sheet.py Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env python
import requests
response = requests.get("https://blok.ugent.be/data.json")
data = response.json()
for location in data:
print("\t".join([
str(location["geometry"]["coordinates"][1]),
str(location["geometry"]["coordinates"][0]),
str(location["properties"]["name"]),
str(location["properties"]["address"]),
str(location["properties"]["capacity"]),
str(location["properties"]["period"]["start"]),
str(location["properties"]["period"]["end"]),
str(location["properties"]["hours"]["monday"]),
str(location["properties"]["hours"]["tuesday"]),
str(location["properties"]["hours"]["wednesday"]),
str(location["properties"]["hours"]["thursday"]),
str(location["properties"]["hours"]["friday"]),
str(location["properties"]["hours"]["saturday"]),
str(location["properties"]["hours"]["sunday"]),
str(location["properties"]["extra"]),
str(location["properties"]["type"])
]))