import json
from urllib2 import urlopen
source = 'https://raw.githubusercontent.com/thebuffalonews/shootings/master/data_cleanup/erie-census-block-group-14.geojson'
f = urlopen(source)
data = json.loads(f.read())
f.close()
schema = list(set([
key
for row in data[u"features"]
for key in row.keys()
]))
print(schema)
ds = vizierdb.new_dataset()
for col in schema:
ds.insert_column(col)
for row in data[u"features"]:
ds.insert_row(values=[ row[key] for key in schema ])
vizierdb.create_dataset('ErieCountyBlocks', ds)
Errors with a IOError:(2, 'No such file or directory') on the spark build. The line it errors on is the very last one vizierdb.create_dataset('ErieCountyBlocks', ds)
Errors with a
IOError:(2, 'No such file or directory')
on the spark build. The line it errors on is the very last onevizierdb.create_dataset('ErieCountyBlocks', ds)