Making a scatterplot
✓ Published0🌍 Public
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 descriptionMIT Licensed