Skip to main content
100%

Fork of d3 and react to load csv

✓ Published1🌍 Public
AAliciaNiu
Last edited Jul 16, 2021
Created on Jul 14, 2021
Forked from Cars Report

This example demonstrates how to load and render CSV data using React and D3 within a VizHub project. It fetches a remote CSV file via D3’s `csv` function, then maps each row to a colored horizontal strip whose background color comes from the `RGB` column. The visualization uses React state and hooks (`useState`, `useEffect`, `useCallback`) to manage asynchronous data loading, displaying a "loading..." message until data arrives. D3 is loaded via UNPKG alongside React, with local ES6 modules imported for additional functionality.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes