Import the required modules and assign the API key to a variable. These commands should be added into Jupyter Notebook cells:
import geopandas as gpdimport pandas as pdimport osfrom mapboxgl.utils import *from mapboxgl.viz import *token = '{user API Key}'
The API key can also be assigned to a Windows path environment variable (for example, "MAPBOX_ACCESS_TOKEN") and called using the os module:
token = os.getenv("MAPBOX_ACCESS_TOKEN")