topojson / us-atlas

Pre-built TopoJSON from the U.S. Census Bureau.
https://observablehq.com/@d3/u-s-map
ISC License
859 stars 139 forks source link

Preserving data? #14

Closed tmcw closed 8 years ago

tmcw commented 10 years ago

In each step of this Makefile, the data from the original shapefiles is thrown away by not specifying -p. Is the expectation that it would be joined back in with another tool?

I'm tinkering with a version of this 'for dummies' that would have pre-built data, preserve a minimum of properties, and aim for that <1MB threshold that's web-map-friendly. Thoughts?

mbostock commented 10 years ago

I prefer smaller files by default, and to have the rules specify the desired data explicitly. This Makefile exists not to serve every purpose by default, but as a template you can modify, such as to add desired properties or change the degree of simplification.

That said, I’d probably be okay with including names in addition to IDs by default. I’m not sure I would use those names, because (for example at NYT) I often want abbreviations instead. But maybe it’s still reasonable to include them so as to avoid joining with another file of names at runtime.

tmcw commented 8 years ago

Okay, cool - the default in this project makes a lot of sense for semi-pro or pro users.

mbostock commented 8 years ago

Related: I would eventually like to extract the property-modifying features out of the topojson command-line tool and put them into a separate tool. This probably means removing the --id-property, --properties, and --external-properties arguments and just having the topojson command always pass-through input properties. Then there would be a separate tool (or tools!) for filtering, transforming and joining properties. A tool that could presumably work with either TopoJSON or GeoJSON.

mbostock commented 8 years ago

Related mbostock/topojson#271.