Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data on "US Police Shootings"

Public visualization

Viewing a saved revision (read-only)

2a5d8995e49242afa0ecca02364da0f5

Loading and Parsing CSV Data on "US Police Shootings"

0 stars0🌍 Public
Llintonylin
Last edited Sep 7, 2020
Created on Sep 7, 2020

This example displays summary statistics for a CSV dataset of US police shootings, showing the file size in kilobytes, row count, and column count in large text. It loads the data using `d3.csv` from d3.v5, then reports `data.length` and `data.columns.length` after parsing. The code also includes commented-out alternatives using `fetch` with `async`/`await` and `d3.csvParse`, highlighting different parsing approaches. The data comes from a gist hosted on GitHub.

AI-generated description

A program that loads and parses some CSV data: US Police Shootings.