Skip to content

Instantly share code, notes, and snippets.

@dyerrington
Last active July 6, 2016 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyerrington/119719f40bb4783997ea to your computer and use it in GitHub Desktop.
Save dyerrington/119719f40bb4783997ea to your computer and use it in GitHub Desktop.
Gmaps examples
# pip install gmaps
import gmaps
""" Earthquake Example """
earthquake_data = gmaps.datasets.load_dataset('earthquakes')
earthquake_data[:5]
m = gmaps.heatmap(earthquake_data, max_intensity=10, point_radius=5)
# Set max_intensity to avoid a few strong earthquakes drowning out all the smaller ones.
# Let's zoom in to North America and the Pacific belt
m._bounds = [[50.547981560433177, -109], [30.28135425049395, -100.13096250000001]]
gmaps.display(m)
""" Taxi Example """
taxi_data = gmaps.datasets.load_dataset('taxi_rides')
taxi_data[:5]
gmaps.heatmap(taxi_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment