Tell us what works and what could be better. We read every submission.
@aimbellone·6 public vizzes
A small-multiples line chart shows the percentage of single and divorced people across 19 Rome districts from 2010 to 2012, with each district represented by a steelblue line. The chart uses d3.v3 with SVG rendering, a time scale for the x-axis, and a linear scale for the percentage values, formatted with `d3.format(".0%")`. Data comes from a CSV file published by the Rome Municipality. Hovering over a line highlights it in orange via a CSS `circle:hover` rule, though the lines themselves are drawn as paths.
A scatterplot displays the percentage of single and divorced residents against the percentage of married and widowed residents across Rome’s districts in 2011, with each circle representing a district and hover tooltips revealing detailed marital-status breakdowns. The visualization uses D3 v3 with SVG rendering, employing `d3.scale.linear`, `d3.svg.axis`, and `d3.csv` to load and plot data from the Rome Municipality. Circle positions are computed from CSV columns for single, married, widowed, and divorced counts, with axes formatted as percentages and a hover effect that changes circle color to orange.
A bar chart shows the percentage of divorced people in each Rome district for 2011, with hover highlighting and tooltips displaying exact counts and percentages. The visualization uses d3.csv to load the dataset, d3.scale.linear for the x-axis width, d3.scale.ordinal with rangeRoundBands for the y-axis categories, and d3.svg.axis for both axes. Rectangles are rendered in SVG and colored steelblue, while the x-axis tick format is set to percentages. Data originates from the Rome Municipality and includes notes about district changes.
A bar chart shows the number of divorced people in each Rome municipality for 2011, with bars labeled by district and value. The visualization uses D3 v3 to load the CSV data and append SVG rectangles and text elements. Bar widths scale proportionally to the Divorced column, divided by 10, while labels appear in white sans-serif font above each bar. The chart also includes notes about municipality boundary changes.
This example combines a hand-coded SVG with D3’s data-loading API. It draws a yellow circle, a red rectangle, and purple text directly in the markup, then uses `d3.csv` to read the local file `marital_status_rome_2011.csv` and log its parsed array of JSON objects to the browser console. The visualization shows static shapes, while the data loading demonstrates how CSV rows are transformed into accessible JavaScript objects for later use.
This visualization uses d3.forceSimulation to distribute 19 points, each labeled by Rome’s district number, across a scatterplot-like space. The underlying dataset, loaded from a gistfile1.txt, records population counts for four marital statuses—Single, Married, Widow(er), and Divorced—per district. The chart encodes each status as a separate force-directed node, with the x-position determined by district and the y-position by population value, resulting in a compact, overlapping point cloud. A simple SVG rendering with axes and district labels makes the comparative distribution across statuses and districts visible at a glance.