Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
SStefanZhang
Last edited Sep 18, 2020
Created on Sep 2, 2020
Forked from Hello VizHub

This example demonstrates how to load and parse three CSV datasets from GitHub Gists using D3 v5. It displays the file size in kilobytes, row count, and column count for each dataset—PM2.5 air quality data, bike rental records, and COVID-19 infection statistics—inside a styled `<pre>` element. The code uses the `d3.csv` method to fetch and parse each file, then `d3.csvFormat` to calculate the raw data size, and `data.length` and `data.columns.length` to report the dimensions. Results are appended incrementally as each promise resolves, with the final output rendered to the page.

AI-generated description

This is a program that loads data set information on the 3 data set I found.

PM2.5: Consistcts air quality data from 2000 - 2018 in different county in different states.

Bike Rental: Bike rental data with various of attributes from 2011 - 2012.

COVID19: COVID19 infection data in united states in different states from 2020/1 till now.

Here are the Github Gist links:

1.PM2.5

2.Bike Rental

3.COVID19

MIT Licensed

Similar vizzes