Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

26995314740c41a3b879cdd98d4a5239

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
AAaronnSeah
Last edited Nov 2, 2021
Created on Oct 28, 2021

This example visualizes the top 10 countries by 2020 population from a UN dataset, displaying horizontal bars scaled by population. It uses React hooks to asynchronously fetch and parse CSV data with d3.csv, then renders an SVG bar chart via d3.scaleBand for the y-axis, d3.scaleLinear for the x-axis, and d3.max for domain calculation. Grid lines and country labels are drawn manually with SVG elements, while a message component calculates row, column, and file size statistics from the parsed data.

AI-generated description