Maps 使用Python3 Vincent Vega创建县地图视觉效果时缺少状态

Maps 使用Python3 Vincent Vega创建县地图视觉效果时缺少状态,maps,topojson,vega,vincent,Maps,Topojson,Vega,Vincent,我正在用文森特为我们绘制县级地图。以2016年电子交易数据为例。然而,它并不适用于加利福尼亚等州。我检查了数据,FIPS代码似乎存在,但仍然显示为空白。你知道会发生什么吗?我从topo.json获取了县数据 按字母顺序排列的前7个州的县的FIPS代码需要零填充到5个字符 科罗拉多州阿拉帕霍县的FIPS代码为8005,该代码在中表示为“08005” geo_data_c2 = [{'name': 'counties', 'url': county_topo, '

我正在用文森特为我们绘制县级地图。以2016年电子交易数据为例。然而,它并不适用于加利福尼亚等州。我检查了数据,FIPS代码似乎存在,但仍然显示为空白。你知道会发生什么吗?我从topo.json获取了县数据


按字母顺序排列的前7个州的县的FIPS代码需要零填充到5个字符

科罗拉多州阿拉帕霍县的FIPS代码为8005,该代码在中表示为“08005”

geo_data_c2 = [{'name': 'counties',
         'url': county_topo,
         'feature': 'us_counties.geo'}]

vis_election_counties = vincent.Map(data=merged, geo_data=geo_data_c2, scale=1000,
              projection='albersUsa', data_bind='per_dem',
              data_key='combined_fips', map_key={'counties': 'properties.FIPS'})



#Change our domain for an even inteager

vis_election_counties.scales['color'].domain = [0,1]
vis_election_counties.legend[![enter image description here][1]][1](title='per_dem')
vis_election_counties.to_json('vega.json')



vis_election_counties.display()
merged['combined_fips'] = merged['combined_fips'].map(lambda i: str(i).zfill(5))