blog life expectancy
This chart shows life expectancy growth from 1890 to 2010 for five North American countries: the United States, Canada, Mexico, Guatemala, and Cuba. Each country appears as a colored line, with gray circles marking individual data points. The chart uses a black background with white axes and labels, and the color scheme comes from the ColorBrewer Accent palette. The code loads simplified data from a GitHub-hosted CSV via `d3.csv`, applies `d3.scaleLinear` for both axes, and draws lines with `d3.line`. It builds the SVG output using `d3.select` and `d3.append`, while the legend is generated with `d3.scaleOrdinal` from the d3-legend library.
AI-generated descriptionA line chart with five lines, using color scale with color brewer in D3
BTW: The data was simplified to help with creating this visualization.
Link to original dataset: https://corgis-edu.github.io/corgis/csv/global_development/