我正在尝试使用 folium 创建一个等值线图,如下所示:https ://pypi.python.org/pypi/folium 。目标是生成美国失业率的等值线图,但是当我打开地图时,美国各州没有阴影。有什么建议吗?
import folium
import pandas as pd
state_geo = r'data/us-states.json'
state_unemployment = r'data/US_Unemployment_Oct2012.csv'
state_data = pd.read_csv(state_unemployment)
#Let Folium determine the scale
map = folium.Map(location=[48, -102], zoom_start=3)
map.geo_json(geo_path=state_geo, data=state_data,
columns=['State', 'Unemployment'],
key_on='feature.id',
fill_color='YlGn', fill_opacity=0.7, line_opacity=0.2,
legend_name='Unemployment Rate (%)')
map.create_map(path='us_states.html')
谢谢,