In [1]:
import gmaps
import gmaps.datasets
gmaps.configure(api_key="AIzaSyCk7WkkADcLP7e8YbvMe6KuIf4V8ml0v5Q")
In [2]:
import numpy as np
In [3]:
locations = gmaps.datasets.load_dataset("taxi_rides")
In [4]:
fig = gmaps.figure()
fig.add_layer(gmaps.heatmap_layer(locations))
fig
In [6]:
locations = gmaps.datasets.load_dataset_as_df("starbucks_kfc_uk")
In [10]:
starbucks_df = locations[locations["chain_name"] == "starbucks"]
starbucks_df = starbucks_df[['latitude', 'longitude']]
starbucks_layer = gmaps.symbol_layer(starbucks_df, fill_color="green", stroke_color="green", scale=2)
fig = gmaps.figure()
fig.add_layer(starbucks_layer)
fig
In [ ]: