Created
April 19, 2019 00:03
-
-
Save ritvikmath/c115dbd90145b89a523df4a52744ace6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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