yaph / d3-geomap

A library for creating geographical maps based on D3.js
https://d3-geomap.github.io/
MIT License
132 stars 45 forks source link

Add support for space in unitId selector #55

Closed geraldo closed 5 years ago

geraldo commented 5 years ago

Would be great to make spaces in unitId selectors work. This would make it possible to use property "name" in topojson files instead of "fips".

I'm doing a choropleth map of Spanish provinces. It works fine to use .unitId("name") for provinces like "Barcelona", but it doesn't work for provinces like "Las Palmas".

yaph commented 5 years ago

Can you post a sample of the CSV file you are using?

geraldo commented 5 years ago

Here a sample of the CSV file:

id,name,num
8,Barcelona,569
35,Las Palmas,17

It doesn't make any difference to put the names in between quotation marks like this:

id,name,num
8,"Barcelona",569
35,"Las Palmas",17