
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@d3-node/choropleth-us-states
Advanced tools
Choropleth of US States via data and defined color scale
$ npm install @d3-node/choropleth-us-states --save
const d3nMap = require('@d3-node/choropleth-us-states')
// read CSV -> parse to json
const csv = fs.readFileSync('./StatePopulations.csv').toString()
const data = d3nMap.csvParse(csv)
const stateNameField = 'State' // optional, default = 1st column
const metricField = 'Population' // optional, default = 2nd column
const colors = [ // 9-color scheme (blue)
'#f7fbff', '#deebf7', '#c6dbef',
'#9ecae1', '#6baed6', '#4292c6',
'#2171b5', '#08519c', '#08306b'
]
const scale = [ // color buckets for state populations
0, 600000, 800000, 1500000, 2500000, 5000000, 9000000, 20000000, 400000000
]
const map = d3nMap({ data, colors, scale, stateNameField, metricField })
map.svgString() // returns <svg>
See test for actual usage.
npm test
{ data, colors, scale, [ stateNameField, metricField ] }
FAQs
D3-Node US States choropleth
We found that @d3-node/choropleth-us-states demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.