PitchInteractiveInc / tilegrams

Make hexagonally tiled cartograms
http://pitchinteractiveinc.github.com/tilegrams
ISC License
214 stars 49 forks source link

Feature Request: Multiple color values allowed per state #77

Closed dwvisser closed 7 years ago

dwvisser commented 7 years ago

I would like to be able to generate tilegrams visualizing state subpopulation breakdown, e.g.,

I'm envisioning a tilegram with clearly marked state boundaries, allowing different colored hexagons within the state. I'd appreciate advice on how to accomplish this.

jessihamel commented 7 years ago

We haven't really thought about this as a use case. I think your best bet would be to load the svg and then color the hexagons using d3 or javascript. The manual has an example of loading a svg.

It's a bit trickier to accomplish this with the topojson as the states are drawn as a single path. Perhaps in the future we could think about exporting a topojson file that has separate features for each hexagon rather than each state.