Sunday 30 August 2020

Vizualizing speed of movement with color scale for location in Python

i have 3 main values (longitude, latitude and speed). Using Folium library i can map the location with lon and lat degree. but now i want also put the velocity with color scale. for example if the speed is between 0-20 the that part of line is red, if speed is between 20-60 the yellow, if the speed is higher than 60 then the line is green. is it possible to do it in python? Can anybody help me with this? my current code is:

my_map = folium.Map(location=[ave_lat, ave_long], zoom_start=14) 
folium.PolyLine(points, color="blue", weight=2.5, opacity=1).add_to(my_map)
my_map

"points" here is lon and lat pairs. but i have also speed column in my csv. my output is like this. Can anybody help me with this? Thanks! enter image description here

but i want to add speed column for data visualising to get something like this enter image description here



from Vizualizing speed of movement with color scale for location in Python

No comments:

Post a Comment