I am having trouble merging a csv with a topojson file.
I want to add the rate
column to the topojson
file as a property.
My csv is like this:
index,id,county,rate,error
1,1001,"Autauga County, Alabama",12.1,1.8
2,1003,"Baldwin County, Alabama",13.9,1.2
3,1005,"Barbour County, Alabama",26.7,2.6
My topojson is a standard us county map:
{"type":"Topology",
"objects":{"counties":
{"type":"GeometryCollection","bbox":[-179.1473399999999,17.67439566600018,179.7784800000003,71.38921046500008],
"geometries":[
{"type":"MultiPolygon","id":53073,"arcs":[[[0,1,2]]]},{"type":"Polygon","id":30105,"arcs":[[3,4,5,6,7,8]]},
I am trying the following command:
topojson -o final.json -e county_level1.csv --id-property=id,id -p id,rate=rate -- us.json
But it's just deleting the id property from the topojson file.
This is a related question at this one, but with an updated attempt at resolution.