Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Assignment7 Reusable Scatter Plot

Public visualization

Viewing a saved revision (read-only)

370c1613db794929bc99e28f5626ff5c

Assignment7 Reusable Scatter Plot

0 stars0🌍 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