我需要制作一个关于巴西数据分布的图形化表示。
我发现 plotly
可以完成这项工作,但是当我去研究如何使用 plotly
时,每个教程都使用 locationmode
属性为 'USA-states'。
是否有国家代码列表,以便我后来查看正确的调用方式?
我需要制作一个关于巴西数据分布的图形化表示。
我发现 plotly
可以完成这项工作,但是当我去研究如何使用 plotly
时,每个教程都使用 locationmode
属性为 'USA-states'。
是否有国家代码列表,以便我后来查看正确的调用方式?
文档来源:https://plot.ly/python/reference/#scattergeo-locationmode
locationmode ( enumerated : "ISO-3" | "USA-states" | "country names" )
default: "ISO-3"
Determines the set of locations used to match entries in `locations` to regions on the map.
所以对于巴西,您需要添加这些行:
locations = ["Brazil"],
locationmode = 'country names'