import pandas as pd
define the world map
world_map = folium.Map()
display world map
world_map

2. 输入经纬度,尺度,在这里我们以旧金山(37.7749° N, 122.4194° W)为例。
San Francisco latitude and longitude values
latitude = 37.77
longitude = -122.42
Create map and display it
san_map = folium.Map(location=[latitude, longitude], zoom_start=12)
Display the map of San Francisco
san_map

更改地图显示,默认为’OpenStreetMap’风格,我们还可以选择’Stamen Terrain’, 'Stamen Toner’等。
Create map and display it
san_map = folium.Map(location=[latitude, longitude], zoom_start=12,tiles=‘Stamen Toner’)

3. 读取数据集(旧金山犯罪数据集)
Read Dataset
cdata = pd.read_csv(‘https://cocl.us/sanfran_crime_dataset’)
cdata.head()
![在这里插入图片描述](https://img-blog.csd