This is lovely. I've hand-coded solutions before to show two variables by region simultaneously (e.g. voting patterns by socio-economic levels:http://imgur.com/ww1WV66). Colour and texture are nicely independent for showing this stuff.
In my opinion the "right" way for static things. Keeps the browser from computing, no need for the original data and libs. Of course being able to inspec other people's d3 code is fun on the other hand.
Thanks for the update! I was unaware of the power of geoJSON (also githubs neat mapping of them) and access to data from places such as gadm.org. Is that where you source the data?
Thank you for sharing this! Can't wait to use this soon :)
Slightly off topic but maybe some SVG expert can help me out with a quick question! Is there a way to identify and automatically recognize all numbers in an image.svg file?
What kind of numbers? Those appearing alone in attributes, such as ? Those appearing in path or polygon data are more complicated, as the syntax allows whitespace, commas, etc. as separators, but they're not needed in some cases. E.g.
M0-1.2.5-3
is perfectly valid (AFAIR, not sure about the decimal points now), but not really nice to parse or extract.
The main point would be what your use case is? If you just need to transform something, e.g. translate or scale a shape it's easier to put a group around it and apply a transform on that.
Comments (61) 30 threads
Earlier commentsWhen I make SVGs they are typically either plots made with a plotting tool, or paths created from tracing or done purely by hand.
Slightly off topic but maybe some SVG expert can help me out with a quick question! Is there a way to identify and automatically recognize all numbers in an image.svg file?
The main point would be what your use case is? If you just need to transform something, e.g. translate or scale a shape it's easier to put a group around it and apply a transform on that.
With the high resolution screens available today these make for stunning graphical presentation.
All comments shown.
Couldn't load more comments. Check your connection and try again.