Maps in Python with Folium

import folium

# define the world map
world_map = folium.Map()

# display world map
world_map

# and you have a world map.
# You can customize this default definition of the world map by specifying
# the centre of your map and the intial zoom level.

# define the world map centered around Canada with a low zoom level
world_map = folium.Map(location=[41.53, 12.28], zoom_start=6)

# display world map
world_map



# if you want to display the physical map
world_map = folium.Map(location=[41.53, 12.28], zoom_start=6, tiles='Stamen Terrain')

# High contrast black and white map
world_map = folium.Map(location=[41.53, 12.28], zoom_start=6, tiles='Stamen Toner')

# add a marker with a pop-up label
binzago_map = folium.Map(location=[41.53, 12.28], zoom_start=6)
folium.features.CircleMarker(
        [45.62, 9.15],
        radius=10, # define how big you want the circle markers to be
        color='yellow',
        fill=True,
        popup=label,
        fill_color='red',
        fill_opacity=0.6
    ).add_child(folium.Popup('Binzago')).add_to(binzago_map)
binzago_map





No comments:

Post a Comment