我正在尝试使用 vincent 包在 jupyter 笔记本中可视化我的数据(在 pandas 中),但在初次尝试时遇到了麻烦,这是我使用的代码(复制自http://wrobstory.github.io/2013/10 /mapping-data-python.html ):
import vincent
import pandas
world_topo=r'world-countries.topo.json'
geo_data = [{'name': 'countries',
'url': world_topo,
'feature': 'world-countries'}]
vis = vincent.Map(geo_data=geo_data, scale=200)
vis.to_json('vega.json')
vis.display()
运行代码后,没有显示任何内容。我检查了vis的类型:
vincent.charts.Map
我不知道如何在这里继续,我很感激任何关于这个问题的意见。