Skip to main content
100%

Let's make a scatterplot with D3.js

✓ Published1🌍 Public
BB Sundaresan
Last edited Jun 30, 2020
Created on Jun 30, 2020

This example uses D3.js v5 within a React framework to render an SVG scatterplot of the top 10 countries by population. The code leverages `d3.select`, `d3.csv`, `d3.scaleLinear`, `d3.scalePoint`, `d3.axisBottom`, and `d3.axisLeft` to map country names to the y-axis and population values to the x-axis. It formats x-axis tick labels with `d3.format` to abbreviate large numbers, and includes grid lines and a chart title. Data is loaded from a CSV file.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes