🌍 Public
Viewing a saved revision (read-only)
b645ffe7334f4c36be557d14104da00f
Making a scatterplot
This example shows a scatterplot of the top 10 most populous countries, with population on the x-axis and country names on the y-axis as categorical points. The code uses D3 v6 APIs including `csv`, `scaleLinear`, `scalePoint`, `axisLeft`, and `axisBottom` to load data from a CSV file and render SVG circles. The y-axis uses a point scale with padding, while the x-axis is linear and formatted to abbreviate large numbers, with gridlines extending across the chart. Population values are multiplied by 1000 to reflect actual counts, and the chart includes labeled axes and a title.
AI-generated description