-
-
Save loopingleo/1c8127b7bcbdb2c870e67a0b64fad7b5 to your computer and use it in GitHub Desktop.
This file contains 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
## ---------- PLOT ON Google MAP ---------------------------- | |
gmap = gmplot.GoogleMapPlotter(df_compressed.lat.mean(), df_compressed.lon.mean(), 14) | |
#plot map circles in different sizes (and colors) | |
for i in range(0,len(df_compressed)-1,20): | |
if abs(df_compressed.speed[i]) < 3/3.6: | |
gmap.circle(df_compressed['lat'][i], df_compressed['lon'][i], | |
color="#f44242", | |
marker=False, | |
radius= 20 * (df_compressed["speed"][i])**(2), | |
#radius = 10, | |
ew = 0.3, | |
face_alpha=0.8, | |
) | |
#gmap.scatter(df['Latitude'], df['Longitude'], df["markColScale"][i], size=0.5, marker=False) | |
#gmap.heatmap(df_compressed['lat'], df_compressed['lon'], threshold=5, radius=40) | |
gmap.draw("your_map_filename.html") # saves to html file for display - open file in your browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment