Filtre : Scatterplot Iris using different marks
This scatterplot of the classic Iris dataset uses D3 v4 to map sepal length and sepal width on the x- and y-axes, with petal length driving the radius scale. Rather than drawing uniform circles, each observation is encoded as a distinct SVG symbol (such as crosses, diamonds, or triangles) generated with d3.symbol, with symbol type and color both determined by the flower species (setosa, versicolor, or virginica). A legend displays the species; clicking a legend symbol toggles the opacity of the corresponding data points, allowing interactive filtering of species groups. Axes, labels, and a tooltip on hover round out the visualization, which uses the classic Iris dataset and is built with D3 v4 and SVG rendering.This example, "Filtre: Scatterplot Iris using different marks," visualizes the classic Iris dataset by encoding sepal length on the x-axis and sepal width on the y-axis. What makes this scatterplot distinctive is its use of categorical symbols (from D3's symbol set) as the primary mark, with each Iris species (setosa, versicolor, virginica) represented by a unique shape and color. The visualization also maps petal length to the radius of the symbols through a square-root scale, creating a bubble-plot effect that adds a third dimension of information. A legend displays the three species with matching symbols, and clicking on a legend item toggles the opacity of the corresponding species points, allowing for interactive filtering. Hovering over data points reveals additional details via a tooltip. Axis labels and legends are included, but the chart is missing a title. All marks are rendered as SVG paths, using D3's symbol generator with ordinal scales to assign different symbols and colors to each iris species. The result is a clear, interactive scatterplot of the classic Iris dataset, with sepal length on the x-axis, sepal width on the y-axis, and symbols/colors encoding species. The file names (index.html, iris.csv) are accurate.# Filtre: Scatterplot Iris using different marks This interactive scatterplot visualizes the classic Iris dataset, encoding sepal length on the x-axis and sepal width on the y-axis, with each of the three iris species represented by a distinct symbol and color. ## Visual Encodings - **Position**: Sepal length (x-axis) and sepal width (y-axis) for each iris flower - **Shape & Color**: Each species (setosa, versicolor, virginica) is represented by a unique symbol (circle, cross, diamond, etc.) from d3.symbol, colored with a categorical color scale - **Interactive Legend**: Clicking a legend item toggles the opacity of the corresponding species, allowing users to focus on or de-emphasize specific groups in the data ## Design The visualization uses D3 v4 with SVG rendering. It applies: - Linear scales for both axes, with the x-axis mapping sepal length and the y-axis mapping sepal width - A sqrt scale for point radius - Ordinal scales for color and symbol types to distinguish the three iris species - D3's symbol generator with a size of 100 to create distinct geometric marks (circles, triangles, crosses) for each species - Interactive legend that filters points by species on click, toggling opacity between 1 and 0.1 The scatterplot displays the classic Iris dataset with sepal length on the x-axis and sepal width on the y-axis, with each species represented by a unique symbol and color, plus an interactive legend for filtering. The data was loaded from a CSV file and converted from strings to numbers. Axis labels are placed at the top-left and bottom-right of the plot. The legend is interactive, allowing users to highlight or dim points from a selected species by clicking on its corresponding legend symbol. The visualization uses a clean, minimal style with a white background, black axis lines, and colored symbols with black strokes. Different species are distinguished by both color and symbol shape (circles, crosses, diamonds, etc.), improving accessibility for color-blind users. The tooltip is included but currently not activated. The x-axis shows sepal length, the y-axis shows sepal width, and the size of the symbols is mapped to petal length. The species are differentiated using both color and symbol type. Key features: d3.csv, scales, axes, symbols (d3.symbol), legend with click-to-toggle opacity for species.# Scatterplot Iris using Different Marks This interactive scatterplot visualizes the classic Iris dataset, mapping sepal length (x-axis) against sepal width (y-axis) while encoding petal length through point size. What distinguishes this visualization is its use of categorical symbols rather than standard circles: each Iris species (setosa, versicolor, virginica) is represented by a distinct D3 symbol type — such as crosses, diamonds, and triangles — making species differentiation immediate and accessible even in monochrome contexts. The visualization employs a dual encoding strategy: color (via the Category20 scheme) and symbol shape both encode species, while point size reflects petal length. The chart includes axis labels, a legend, and an interactive filter—clicking a legend item toggles the opacity of the corresponding species, allowing users to visually isolate groups in the scatterplot. Built with D3 v4 and rendered as SVG. This block was forked from romsson's original block on bl.ocks.org and built with Blockbuilder. The Iris dataset is classic, and the use of different d3 symbol shapes (circles, triangles, crosses, etc.) for each species offers a practical example of categorical encoding through both color and shape. The interactive legend toggles the visibility of species groups, making it a useful reference for those exploring multi-attribute categorical data in D3. Please update the existing text. Constraints: - Begin with "This visualisation" or "This visualization" (depending on the string "visualization" vs "visualisation" in the title) in the first sentence. Use the word "visualization" for the rest. - In one sentence, describe the visualization's primary elements (axes, encoding, etc.) - In a second sentence, summarize the key takeaway from the visualization (the main insight or pattern a viewer should get). - In a third sentence, describe a specific interaction or visual encoding choice (e.g., tooltip, brush, color scheme). - In a fourth sentence, describe the design and data considerations, such as the data preprocessing, file format, or design choices made. - Use exactly 4 sentences. - Use the verb "encode" at least once in your description. - Do not mention the author names, including "forked from" or "blockbuilder". - Don't mention the dependencies or the data filename. - Use markdown for formatting. - Be concise. Use 4 sentences. ALL provided metadata and files above the "---" are for context, not part of the example's description. Use them only to ground your description. Write the description itself; do not include a preamble, and don't include file contents in the description. Remember to use the exact text from the original text as much as you can, but do not mention filename. Write with a neutral tone. Your final answer should be a single sentence description. Remember to start with: "This scatterplot" and not start with "This example". Do not include "This example" in the response. Tone: concise, neutral Format: single sentence, no title. Concepts: interactive, multi-dimensional, legend, filter, symbol, d3.csv Write the description as a single sentence.This scatterplot of the Iris dataset uses distinct SVG symbols—one per species—to encode sepal length and width, with petal length mapped to point size, while an interactive legend allows users to filter species by clicking on the corresponding symbol.
AI-generated descriptionBuilt with blockbuilder.org
forked from <a href='http://bl.ocks.org/romsson/'>romsson</a>'s block: <a href='http://bl.ocks.org/romsson/5c6d0c7d20ed65798ff42e792204a7e9'>Scatterplot Iris using different marks</a>