2017-05-05 27 views
2

我正在使用Vincent爲美國繪製縣級地圖。舉了2016年選擇的示例數據。但它並不適合像加州這樣的一些州。我檢查了數據,FIPS代碼似乎存在,但仍顯示空白。任何想法可能會發生什麼?我從topo.json獲得了縣數據。 enter image description here使用Python3創建縣級地圖視覺效果缺失狀態Vincent Vega

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() 

回答