Viewing a saved revision (read-only)
f65856e35ea140fca4a00c64f89aea35
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 descriptionThis dataset documents the number of NICS background checks. I've truncated the total number of rows to one years worth of checks to reduce the size. I've also reduced the number of columns to only the data that is interesting to me and is easy to describe. The attributes are as follows: month: month and year of number of checks: DATE state: US state (or territory) of the NICS background check: CATEGORICAL handgun: quantity of handgun background checks: quantitative long-gun: quantity of long gun background checks: quantitatve other: quatity of other background checks, most likely NFA items such as silencers, machine guns, etc: quantitative multiple: quantity of background checks for multiple sales: quantitative
The NICS dataset can be found here: https://github.com/BuzzFeedNews/nics-firearm-background-checs