{"_id":"@d3-node/choropleth-us-states","_rev":"4-1d3936e08f31292aa659e5181e700446","name":"@d3-node/choropleth-us-states","description":"D3-Node US States choropleth","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.1":{"name":"@d3-node/choropleth-us-states","private":false,"version":"0.1.1","description":"D3-Node US States choropleth","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/d3-node/choropleth-us-states.git"},"keywords":["d3","node"],"author":{"name":"Brad Oyler"},"license":"MIT","bugs":{"url":"https://github.com/d3-node/choropleth-us-states/issues"},"homepage":"https://github.com/d3-node/choropleth-us-states#readme","devDependencies":{"d3node-output":"0.0.9","standard":"^10.0.3"},"dependencies":{"d3-node":"1.1.1","topojson":"^3.0.0"},"gitHead":"7932d435a74defc8d01eedc51b7fb2d979106e47","_id":"@d3-node/choropleth-us-states@0.1.1","_shasum":"a455676e9597b83d3f4750f290029aea91f2dea4","_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":"a455676e9597b83d3f4750f290029aea91f2dea4","tarball":"https://registry.npmjs.org/@d3-node/choropleth-us-states/-/choropleth-us-states-0.1.1.tgz","integrity":"sha512-mEfOZp+ZshMAjX7wGjwd1dcoY2eFtlKlSwjRMgmuATB5iERjslSxoP5mLVnDxrHvsQ4MaZijwPUlPFHmNh+Zpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7mxl2d7UhJ+6OI32co6+177RHWmCtNfLzArGypjcaaQIhAKiLAb+KDfwATpqoMQsylOpe1CquDLhKyB6ZuECbOjFc"}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/choropleth-us-states-0.1.1.tgz_1503628514044_0.41000770195387304"}},"0.2.0":{"name":"@d3-node/choropleth-us-states","private":false,"version":"0.2.0","description":"D3-Node US States choropleth","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/d3-node/choropleth-us-states.git"},"keywords":["d3","node"],"author":{"name":"Brad Oyler"},"license":"MIT","bugs":{"url":"https://github.com/d3-node/choropleth-us-states/issues"},"homepage":"https://github.com/d3-node/choropleth-us-states#readme","devDependencies":{"d3node-output":"0.0.9","standard":"^10.0.3"},"dependencies":{"d3-node":"1.1.1","topojson":"^3.0.0"},"gitHead":"40599e5c7fe6232d230c1e96072ddc01daac9b35","_id":"@d3-node/choropleth-us-states@0.2.0","_shasum":"4171447fb95fa892531cd6bcb158c411d62c3469","_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":"4171447fb95fa892531cd6bcb158c411d62c3469","tarball":"https://registry.npmjs.org/@d3-node/choropleth-us-states/-/choropleth-us-states-0.2.0.tgz","integrity":"sha512-byuP0FgB8JY+L1RJTjeXSnXFwNSPFVcOqBJsQxr/CHyWGCfTdzg3XV3iAq++ftrzoaIJR2reCqXiVNXtuAdMGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7/FNRIhZjhpLeohaBCyWKGNSRhYbRix/f00aFahCV5gIgIysXb96kbmSm8vc1p68IgmJudho5Y+MLO+PdJvlqel8="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/choropleth-us-states-0.2.0.tgz_1503632600496_0.41374978818930686"}},"0.2.1":{"name":"@d3-node/choropleth-us-states","private":false,"version":"0.2.1","description":"D3-Node US States choropleth","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/d3-node/choropleth-us-states.git"},"keywords":["d3","node"],"author":{"name":"Brad Oyler"},"license":"MIT","bugs":{"url":"https://github.com/d3-node/choropleth-us-states/issues"},"homepage":"https://github.com/d3-node/choropleth-us-states#readme","devDependencies":{"d3node-output":"0.0.9","standard":"^10.0.3"},"dependencies":{"d3-node":"1.1.1","topojson":"^3.0.0"},"gitHead":"b75fdfa876f2d7d3b61a94510be41e234cff7aa0","_id":"@d3-node/choropleth-us-states@0.2.1","_shasum":"80a3f91a6cc4e93f816352fd08ad9c86f396b81d","_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":"80a3f91a6cc4e93f816352fd08ad9c86f396b81d","tarball":"https://registry.npmjs.org/@d3-node/choropleth-us-states/-/choropleth-us-states-0.2.1.tgz","integrity":"sha512-wiYxMuLCmNrALWSt2JBTG/EnFsqlSWkJoix+AFaEHII9NOlCj61qnHgWt3XdZFKeaBwX1c0L3HKuUeDQ9dpvYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQQYprhlQRFP9XFzOHiSs651ZHe7+9itzxR4Se/jO+nAiEA/6qDpDjxKhIynXm9tYVo//eMsCkHRYQX1gFEG7CMmIk="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/choropleth-us-states-0.2.1.tgz_1503639735740_0.5664893605280668"}}},"readme":"## Choropleth Map of US States :earth_americas:\n\nChoropleth of US States via data and defined color scale \n\n![map](./test/output.png)\n\n## Install\n```bash\n$ npm install @d3-node/choropleth-us-states --save\n```\n\n## Usage\n\n```js\nconst d3nMap = require('@d3-node/choropleth-us-states')\n\n// read CSV -> parse to json\nconst csv = fs.readFileSync('./StatePopulations.csv').toString()\nconst data = d3nMap.csvParse(csv)\n\nconst stateNameField = 'State' // optional, default = 1st column\nconst metricField = 'Population' // optional, default = 2nd column\nconst colors = [ // 9-color scheme (blue)\n  '#f7fbff', '#deebf7', '#c6dbef',\n  '#9ecae1', '#6baed6', '#4292c6',\n  '#2171b5', '#08519c', '#08306b'\n]\nconst scale = [ // color buckets for state populations\n  0, 600000, 800000, 1500000, 2500000, 5000000, 9000000, 20000000, 400000000\n]\n\nconst map = d3nMap({ data, colors, scale, stateNameField, metricField })\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, [ stateNameField, metricField ] }`\n","maintainers":[{"name":"bradoyler","email":"bradoyler@gmail.com"}],"time":{"modified":"2022-06-12T16:51:03.554Z","created":"2017-08-25T02:35:15.377Z","0.1.1":"2017-08-25T02:35:15.377Z","0.2.0":"2017-08-25T03:43:21.692Z","0.2.1":"2017-08-25T05:42:17.436Z"},"homepage":"https://github.com/d3-node/choropleth-us-states#readme","keywords":["d3","node"],"repository":{"type":"git","url":"git+https://github.com/d3-node/choropleth-us-states.git"},"author":{"name":"Brad Oyler"},"bugs":{"url":"https://github.com/d3-node/choropleth-us-states/issues"},"license":"MIT","readmeFilename":"README.md"}