Skip to main content
100%

Assignment7 Reusable Scatter Plot

✓ Published0🌍 Public
445.saiful@gmail.com
Last edited Mar 30, 2026
Created on Mar 30, 2026
Forked from D3 Starter

This reusable scatter plot visualizes the relationship between population and area for the top 100 cities worldwide, with each data point representing a city. The chart uses D3 v7's `d3.csv` to load data from a local CSV file, `d3.scaleLinear` for both axes, and `d3.axisBottom` and `d3.axisLeft` to render the axes. The `scatterPlot` function encapsulates the chart configuration, accepting data and margin settings as parameters, making it easily reusable for different datasets. Points are drawn as SVG circles with steelblue fill and opacity, while axis labels are positioned using SVG text elements.

AI-generated description
MIT Licensed

Similar vizzes