7

I'm trying to use google map API to visualize some data in jupyter notebook. Here is the code I used to display basic map in jupyter:

import gmaps
import os
import json
import gmaps.datasets

gmaps.configure(api_key="AIz....")

fig=gmaps.figure()

fig

After I ran the code, nothing was displayed. I used my own google API key and couldn't figure out why the map isn't displayed. I'm new to the geojson field, so any idea or thoughts is appreciated.

Zhenyu Bo
  • 171
  • 1
  • 2
  • 5

2 Answers2

9

Did you make sure Widgets are enabled in your jupyter? try this before you run Jupyter:

jupyter nbextension enable --py gmaps
jupyter nbextension enable --py widgetsnbextension
Nbarjest
  • 691
  • 6
  • 9
0

If you are using JupyterLab you can check out the steps in the documentation here JupyterLab Documentation