Stamen Toner ,Stamen Terrain and Mapbox Bright Maps in Python-Folium - GeeksforGeeks

03 Jul, 2020
Folium library is a powerful data visualization library in Python used by people to visualize geospatial data and maps. With the Folium library, we can create map of any location in the world with the help of latitude and longitude of that location. We can also create interesting visualizations by superimposing markers as well as clusters of markers on top of the map. We can create maps of different styles such as street level, stamen map, and Mapbox Bright map. The maps can be created by Folium using the ‘map’ function. The maps are interactive which means we can zoom in and out after the map is created by specifying the zoom level according to our choice. The default map style is the open street map, which shows a street view of an area when we zoom in and show the borders of the world countries when we zoom out. Folium library has various features. One of the most important features is map styles with which we can create different map styles using the tiles parameter. The tiles include stamen tone, stamen terrain, etc. Stamen toner is used for visualizing features like river meanders and coastal zones. Another tile style is stamen terrain which is used for visualizing features like hill shading and natural vegetation colors.
These are high-contrast Black and White maps. They are used for data mashups and for exploring and visualizing river meanders and coastal zones.
These maps are used to highlight hill shading and natural vegetation colors. They showcase advanced labeling features and linework generalization of dual carriageway roads.
These are maps that similar to the default style, except that the borders are not visible with a low zoom level. They differ form the default style because default style displays country names in each country’s native language whereas Mapbox Bright style tile displays all country names in English.
Example 1: Stamen Tonner map of the world centered around Mumbai
import numpy as np  import pandas as pdimport folium  # define the world mapworld_map = folium.Map()  # create a Stamen Toner map of the world# centered around Mumbaiworld_map = folium.Map(location =[19.11763765873, 72.9060384756],                        zoom_start = 10, tiles ='Stamen Toner')  # display mapworld_map
Output :
Example 2: Stamen Terrain map of the world centered around Mumbai
import numpy as np  import pandas as pdimport folium  # define the world mapworld_map = folium.Map()  # create a Stamen Terrain map of the world # centered around Mumbai with a zoom level # of 10world_map = folium.Map(location =[19.11763765873, 72.9060384756],                       zoom_start = 10, tiles ='Stamen Terrain')  # display mapworld_map
Output :
Example 3: Mapbox Bright map of the world centered around Mumbai
import numpy as np  import pandas as pdimport folium  # define the world mapworld_map = folium.Map()  # create a Mapbox Bright map of the world # centered around Mumbai with a zoom level # of 10world_map = folium.Map(location =[19.11763765873, 72.9060384756],                        zoom_start = 10, tiles ='Mapbox Bright')  # display the mapworld_map
Output :
python-utility
Python
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Read a file line by line in Python
Enumerate() in Python
How to Install PIP on Windows ?
Python String | replace()
sum() function in Python
Python | Get unique values from a list
Python string length | len()
*args and **kwargs in Python
Check if element exists in list in Python