yaph / d3-geomap

A library for creating geographical maps based on D3.js

Home Page:https://d3-geomap.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for space in unitId selector

geraldo opened this issue · comments

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".

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

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