Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google map does not display correctly in jupyter notebook

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.

like image 579
Zhenyu Bo Avatar asked Aug 20 '17 06:08

Zhenyu Bo


1 Answers

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
like image 197
Nbarjest Avatar answered Nov 15 '22 16:11

Nbarjest