[folium] Circle map

SOOYEON·2022년 11월 9일
0

pandas

목록 보기
37/37
post-custom-banner
m = folium.Map(location=[37.4073237, 127.1162796], 
               tiles = 'stamentonerbackground', 
               zoom_start= 9)

circle map

def circle_map(df):
    # m.add_child(minimap)

    # Circle
    for i in range(len(df)):
        folium.Circle(list(df.iloc[i][['y','x']]),
                      radius = 1000,
                      tooltip=df['place_name'][i],
                      popup =folium.Popup(df['address_name'][i],
                                    max_width=450, max_height=450),
                      color='#7C83FD', fill_color = '#7C83FD'
                     ).add_to(m)
        
    return m
def circle_map_g(df):
    # m.add_child(minimap)

    # Circle
    for i in range(len(df)):
        folium.Circle(list(df.iloc[i][['y','x']]),
                      radius = 1000,
                      tooltip=df['place_name'][i],
                      popup =folium.Popup(df['address_name'][i],
                                    max_width=450, max_height=450),
                      color='#76BA99', fill_color = '#76BA99'
                     ).add_to(m)
        
    return m
def circle_map_r(df):
    # m.add_child(minimap)

    # Circle
    for i in range(len(df)):
        folium.Circle(list(df.iloc[i][['y','x']]),
                      radius = 1000,
                      tooltip=df['place_name'][i],
                      popup =folium.Popup(df['address_name'][i],
                                    max_width=450, max_height=450),
                      color='#F38BA0', fill_color = '#F38BA0'
                     ).add_to(m)
        
    return m
circle_map(adf)
circle_map_g(kdf)
circle_map_r(ydf)

post-custom-banner

0개의 댓글