update
This commit is contained in:
parent
84108aa3ae
commit
498a33c335
102002
scrape/out.json
Normal file
102002
scrape/out.json
Normal file
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
import geopy
|
||||
# from funda_scraper import FundaScraper
|
||||
from funda_scraper.scrape import FundaScraper
|
||||
import datetime, os, pickle, json, tqdm
|
||||
import datetime, os, pickle, json, tqdm, numpy
|
||||
import osrm
|
||||
|
||||
OSRM_HOST = 'http://www.herreweb.nl:5998'
|
||||
OSRM_HOST = 'https://osrm.herreweb.nl'
|
||||
NOMINATIM_HOST = 'geocode.herreweb.nl'
|
||||
|
||||
osrm_c = osrm.Client(host=OSRM_HOST)
|
||||
@ -65,10 +65,18 @@ def generate_json(houses):
|
||||
|
||||
out_dict['name'] = f"{address}_{count}" # Fix for duplicate names in dictionary.
|
||||
out_dict['position'] = destination_location
|
||||
|
||||
|
||||
|
||||
for key in houses.keys():
|
||||
out_dict[key] = houses.__getattr__(key).get(i)
|
||||
|
||||
get_distances(out_dict, destination_location)
|
||||
|
||||
# Convert numpy data to dumpable python data
|
||||
for key in out_dict:
|
||||
if type(out_dict[key]) == numpy.int64:
|
||||
out_dict[key] = int(out_dict[key])
|
||||
|
||||
out.append(out_dict)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user