Skip to content

Instantly share code, notes, and snippets.

@fclesio
Created May 18, 2020 09:26
Show Gist options
  • Save fclesio/fcc9ad3c9f9e00ad20926ecff36c1bd3 to your computer and use it in GitHub Desktop.
Save fclesio/fcc9ad3c9f9e00ad20926ecff36c1bd3 to your computer and use it in GitHub Desktop.
Navigate in jSON
import json
import pandas as pd
print("Started Reading JSON file")
with open("citylots.json", "r") as read_file:
print("Converting JSON encoded data into Python dictionary")
developer = json.load(read_file)
points_coordinates = []
for i in developer["features"]:
try:
coord = i["geometry"]["coordinates"]
except:
coord = None
try:
street = i["properties"]["STREET"]
except:
street = None
points_coordinates.append((coord, street))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment