🌍 Public
Viewing a saved revision (read-only)
59db318776fb4c1fae36f2e790600d65
Fork of Loading Data - NICS Data
This example loads a CSV of FBI NICS firearm background check data using `d3.csvParse` after fetching the file with the Fetch API. It displays the parsed data as raw JSON in a `<pre>` element, converting the numeric columns—handgun, long_gun, other, and multiple—to numbers with the unary plus operator. The visualization tracks loading state through a `setState` callback, initially showing `"LOADING"` before the data appears. The code relies on D3 v7 methods including `select`, `csvParse`, and `join` to render the output.
AI-generated descriptionThe NICS dataset can be found here: https://github.com/BuzzFeedNews/nics-firearm-background-checks