{"_id":"@d3-node/choropleth-us-counties","_rev":"2-13a51b48c8fd1605c68aa36681b57e0c","name":"@d3-node/choropleth-us-counties","description":"D3-Node Choropleth of US counties (with state boundaries)","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@d3-node/choropleth-us-counties","private":false,"version":"0.0.1","description":"D3-Node Choropleth of US counties (with state boundaries)","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/d3-node/choropleth-us-counties.git"},"keywords":["d3","node"],"author":{"name":"Brad Oyler"},"license":"MIT","bugs":{"url":"https://github.com/d3-node/choropleth-us-counties/issues"},"homepage":"https://github.com/d3-node/choropleth-us-counties#readme","devDependencies":{"d3node-output":"0.0.9","standard":"^10.0.3"},"dependencies":{"d3-node":"1.1.1","topojson":"^3.0.0"},"gitHead":"a282c049d38d7d48f3e454a421d4da9ad469efd9","_id":"@d3-node/choropleth-us-counties@0.0.1","_shasum":"4c3f5895771b54837280ba8e119da2c40c5a0c37","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"bradoyler","email":"bradoyler@gmail.com"},"maintainers":[{"name":"bradoyler","email":"bradoyler@gmail.com"}],"dist":{"shasum":"4c3f5895771b54837280ba8e119da2c40c5a0c37","tarball":"https://registry.npmjs.org/@d3-node/choropleth-us-counties/-/choropleth-us-counties-0.0.1.tgz","integrity":"sha512-IMrf/MCzUwj2HKlAqIcF3YhP/xU4Z6MK+s/FUIdEle4CIB83WKnJr8ER9ozYUb6yY1WTyMIpTIbeO34F6msYzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCspbR2CCpM8gbjJCjOoOCtutKuWyBsZzHuNYhG1WQbXgIgFOqc1AdhxF0RrWfaW5RM9OjUL2Fm3RT5YqhY/DTh6i4="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/choropleth-us-counties-0.0.1.tgz_1503638699853_0.45098254713229835"}}},"readme":"## Choropleth Map of US Counties :earth_americas:\n\nChoropleth of US counties via CSV data and custom color scale \n\n![map](./test/output.png)\n\n## Install\n```bash\n$ npm install @d3-node/choropleth-us-counties --save\n```\n\n## Usage\n\n```js\nconst d3nMap = require('@d3-node/choropleth-us-counties')\n\n// read CSV -> parse to json\nconst csv = fs.readFileSync('./unemployment.csv').toString()\nconst data = d3nMap.csvParse(csv)\n\nconst colors = [ // 9-color scheme (blue)\n  '#f7fbff', '#deebf7', '#c6dbef',\n  '#9ecae1', '#6baed6', '#4292c6',\n  '#2171b5', '#08519c', '#08306b'\n]\n\nconst scale = [ 2, 3, 4, 5, 6, 7, 8, 9 ] // buckets for unemployment rate\n\nconst map = d3nMap({ data, colors, scale })\nmap.svgString() // returns <svg>\n```\n\nSee [test](./test/index.js) for actual usage.\n\n##### Output the test map to an image (PNG)\n```\nnpm test\n```\n\n## API\n\n#### Options \n`{ data, colors, scale, [ idField = 0, metricField = 1 ] }`\n","maintainers":[{"name":"bradoyler","email":"bradoyler@gmail.com"}],"time":{"modified":"2022-06-12T16:51:03.329Z","created":"2017-08-25T05:25:01.583Z","0.0.1":"2017-08-25T05:25:01.583Z"},"homepage":"https://github.com/d3-node/choropleth-us-counties#readme","keywords":["d3","node"],"repository":{"type":"git","url":"git+https://github.com/d3-node/choropleth-us-counties.git"},"author":{"name":"Brad Oyler"},"bugs":{"url":"https://github.com/d3-node/choropleth-us-counties/issues"},"license":"MIT","readmeFilename":"README.md"}