Lurker News

Comments (61) 30 threads

Earlier comments
OliverM#
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.
neumann1 reply#
very nice. One tangential question, the example svg maps are not created in the browser. How are these typically created?

When I make SVGs they are typically either plots made with a plotting tool, or paths created from tracing or done purely by hand.

ncza#
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.
neumann#
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?
BaconJuice1 reply#
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?

ygra#
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.

mmf#
This library is fantastic. These patterns are essential in the production of print-ready and print-like contents.

With the high resolution screens available today these make for stunning graphical presentation.

Load more comments