Basic Scatter Plot
This basic scatter plot maps the longitude and latitude of cities from a CSV sample dataset, showing their geographic positions. Each circle represents a city, plotted with D3's `d3.scaleLinear()` for the x and y axes. The visualization uses the D3 v4 library alongside `d3.legendColor` to generate a color legend, though the color encoding is disabled in this version. Axes are rendered via `d3.axisBottom` and `d3.axisLeft`, with grid lines and labels for clarity. The data is loaded using `d3.csv`, parsing the lat and lng values for each point.
AI-generated descriptionPart of the video course: D3.js in Motion.
An example scatter plot with color legend using D3 and d3-legend.
This shows the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations. Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.
forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/ecb09f2605c7fbbadf0eeb75da5f0a6b'>Stylized Scatter Plot with Color Legend</a>
forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/7a65777a1e310b76aca5d499e967c467'>Stylized Scatter Plot with Color Legend</a>
forked from <a href='http://bl.ocks.org/SSabu/'>SSabu</a>'s block: <a href='http://bl.ocks.org/SSabu/d8088db277c38474f478f3b80ba94ed2'>Global Cities Scatterplot</a>