Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data - NICS Data

Public visualization

Viewing a saved revision (read-only)

c81b5cbc6f7f4ae8bed5f70d5f19481a

Fork of Loading Data - NICS Data

0 stars2🌍 Public
Rrpkupfer@wpi.edu
Last edited Sep 3, 2025
Created on Sep 2, 2025
Forked from Loading 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 description

This 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