Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

folium add a polygon to a map

for _, r in df.iterrows():
    # Without simplifying the representation of each borough,
    # the map might not be displayed
    sim_geo = gpd.GeoSeries(r['geometry']).simplify(tolerance=0.001)
    geo_j = sim_geo.to_json()
    geo_j = folium.GeoJson(data=geo_j,
                           style_function=lambda x: {'fillColor': 'orange'})
    folium.Popup(r['BoroName']).add_to(geo_j)
    geo_j.add_to(m)
m
Comment

PREVIOUS NEXT
Code Example
Python :: python recase 
Python :: databases not showing in odoo 13 
Python :: merge python list items by index one after one 
Python :: sqlite3.operationalerror no such column version 
Python :: refresh tab selenium python 
Python :: Filter dataarray 
Python :: whois eyedress 
Python :: seaborn regression jointplot for continuous variable .. 
Python :: open a tkinter window fullscreen with button 
Python :: sum of two diagonals in matrix 
Python :: hack twitter with python 
Python :: network setting for virtualbox kali 
Python :: pandas join non-unique 
Python :: 2d vector in python 
Python :: how to change continuous colour in plotply 
Python :: int and text on same line python 
Python :: cartpole dqn reward max is 200 
Python :: dinoscape für pc 
Python :: how to import pil in spyder 
Python :: ec2 ssh terminal hangs after sometime 
Python :: cbv uk django 
Python :: shorter Max fonction code in python 
Python :: sns linear regression 
Python :: python code for fibonacci 
Python :: how to move a specific row to last row in python 
Python :: how to execute queries with cxoracle python 
Python :: test api register user 
Python :: hebrew range 
Python :: comment interpreter tuple python avec valeur unique 
Python :: chain lists 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =