Skip to content

Instantly share code, notes, and snippets.

@erraticgenerator
Last active October 31, 2020 19:33
Show Gist options
  • Save erraticgenerator/eecd6fe37a3e1cccd2baec6a919a1a19 to your computer and use it in GitHub Desktop.
Save erraticgenerator/eecd6fe37a3e1cccd2baec6a919a1a19 to your computer and use it in GitHub Desktop.
# option 1. dynamically download JSON
# url = 'https://www.googleapis.com/webfonts/v1/webfonts?key='
# key = 'YOUR-API-KEY'
# data = pd.read_json(url+key, orient='')
# option 2. use JSON already downloaded (replace with your own file path)
df = pd.read_json('../../input/fonts-master.json')
# df.head()
# flatten the JSON hierarchy (easier to handle this way)
df = pd.json_normalize(df['items'])
# df.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment