我有一个数据集
data2 = dict(type = 'choropleth',
locations = df3['Code'],
z = df3['Power Consumption KWH'])
layout2 = dict(title = '2014 Global Power Consumption',
geo = dict(showframe = False, projection = {'type': 'natural earth'}))
choromap2 = go.Figure(data = [data2], layout=layout2)
iplot(choromap2)
在那之后,我创建了一个choropleth,但我的问题是地图没有显示任何颜色,它只显示了地球的形状。
提前谢谢
我试图复制您的数据,发现您缺少一个重要参数,即
locationmode = "country names"
。加上这个应该行得通相关问题 更多 >
编程相关推荐