Skip to content

Instantly share code, notes, and snippets.

@ritvikmath
Created April 19, 2019 00:03
Show Gist options
  • Select an option

  • Save ritvikmath/c115dbd90145b89a523df4a52744ace6 to your computer and use it in GitHub Desktop.

Select an option

Save ritvikmath/c115dbd90145b89a523df4a52744ace6 to your computer and use it in GitHub Desktop.
#initialize the map around LA County
laMap = folium.Map(location=[34.0522,-118.2437], tiles='Stamen Toner', zoom_start=9)
#add the shape of LA County to the map
folium.GeoJson(laArea).add_to(laMap)
#for each row in the Starbucks dataset, plot the corresponding latitude and longitude on the map
for i,row in df.iterrows():
folium.CircleMarker((row.latitude,row.longitude), radius=3, weight=2, color='red', fill_color='red', fill_opacity=.5).add_to(laMap)
#save the map as an html
laMap.save('laPointMap.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment