Skip to main content
100%

E20 - Rendering Data with React

✓ Published0🌍 Public
VVanessa
Last edited Mar 1, 2021
Created on Mar 1, 2021

This example demonstrates real-time New Zealand transport volume data, imported from a GitHub-hosted CSV file, rendered as a series of colored div elements using React. The application uses D3’s `csv` utility to asynchronously fetch and parse the dataset, converting the string `Volume` values into numeric `Trips` properties. React’s `useState` and `useEffect` hooks manage the loading state, displaying a large "loading..." message until data is ready, after which each record becomes an individual styled `<div>`. The visualization leverages React’s DOM rendering capabilities rather than SVG, with colors sourced directly from the data’s `color` field.

AI-generated description

A program that loads in some data about nz transport volumes using D3 utilities and uses React to render the data.

MIT Licensed

Similar vizzes