相关问题 https://stackoverflow.com/questions/17450273/adding-external-properties-to-topojson-file
我正在尝试将外部属性添加到 topojson 文件,us-counties.json
(用做us-atlas https://github.com/mbostock/us-atlas using make topo/us-counties.json
)。我正在下班这个例子 http://bl.ocks.org/mbostock/5562380。但我生成的 topojson 文件us-counties-with-population.json
has 根本没有属性.
我的电话看起来像:
topojson --external-properties data.csv \
--id-property id_county \
--properties population=+percent_population \
-o us-counties-with-population.json \
-- us-counties.json
我的数据看起来像(head -n5 data.csv
):
id_county,county_name,percent_population
01003,"Baldwin County, Alabama",9.71576144493279
01043,"Cullman County, Alabama",6.734653334216277
01051,"Elmore County, Alabama",7.095232589509385
01069,"Houston County, Alabama",9.857459440234194
我正在使用 topojson v1.2.2。我想我可能缺少一些与 id 匹配方式相关的内容,但我不确定它是什么。