Node package and command line tool for generating GeoJSON from U.S. Census Bureau Cartographic Boundary Shapefiles.
At it's bare bones, it downloads the counties shapefile, converts it to GeoJSON and (optionally) filters the counties to a particular state.
This is designed to be called from an npm script to help build data for other packages.
npm install https://github.com/ghing/census-boundaries
var getCountyGeoJSON = require('tiger-boundaries').getCountyGeoJSON;
getCountyGeoJSON('500k', ['IA'], function(err, data) {
console.log(JSON.stringify(data));
});
countyjson 500k --state IA > iowa.json
var getCongressionalDistrictGeoJSON = require('tiger-boundaries').getCongressionalDistrictGeoJSON;
getCongressionalDistrictGeoJSON('500k', '114', ['IL'], function(err, data) {
console.log(JSON.stringify(data));
});
cdjson 500k 114 --state IL > cd_illinois.json