import json import re #import geocoder from mapbox import Geocoder from helper import FileHelper properties = FileHelper.read_json_file("data/malta_villa_properties.json") properties_bungalow = FileHelper.read_json_file( "data/malta_bungalow_properties.json") properties.extend(properties_bungalow) ids = {} properties_adjusted = [] mapbox_token = "bla" geocoder = Geocoder(access_token="token") count = 0 for p in properties: # count = count + 1 # if 10 < count : # break try: if p['id'] in ids: continue ids[p['id']] = True bedrooms = None
from helper import FileHelper import json data = FileHelper.read_json_file("data/geocoded_properties_info.json") for d in data: if d["place"] == "Gozo - Xaghra": d["latitude"] = 36.051303 d["longitude"] = 14.267890 if d["place"] == "Gozo - Qala": d["latitude"] = 36.035591 d["longitude"] = 14.314627 if d["place"] == "Dingli": d["latitude"] = 35.860394 d["longitude"] = 14.382788 if d["place"] == "Gozo - Fontana": d["latitude"] = 36.037855 d["longitude"] = 14.235865 if d["place"] == "Pieta": d["latitude"] = 35.893096 d["longitude"] = 14.493920 if d["place"] == "Gozo - Ghasri": d["latitude"] = 36.068941 d["longitude"] = 14.222510 if d["place"] == "Gozo - Kercem":