Average Price Histories
This line chart visualizes average consumer prices from Bureau of Labor Statistics data, showing price histories across multiple product categories from 1984 to 2007. The visualization uses D3's multi-series CSV format, with each category rendered as a distinct colored line using a perceptual color space (d3.hcl) for optimal discrimination. The chart employs conventional margins and D3's time scale for the x-axis and linear scale for the y-axis, with axes displayed using D3's SVG axis component. Data is loaded and parsed with d3.csv and d3.time.format, while d3.extent, d3.min, and d3.max compute the domains. Each series line is generated with d3.svg.line, and Underscore.js utilities (_pluck, _each, _map) help manipulate the data arrays. The visualization clearly shows historical price trends for various consumer goods across multiple decades.
AI-generated descriptionThis line chart is constructed from a CSV in the "Multi-Series Format" from Bureau of Labor Statistics Consumer Price Index data. The chart employs conventional margins and a number of D3 features:
- d3.csv - load and parse data
- d3.time.format - parse dates
- d3.time.scale - x-position encoding
- d3.scale.linear - y-position encoding
- d3.hcl - a perceptual color space
- d3.extent, d3.min and d3.max - compute domains
- d3.svg.axis - display axes
- d3.svg.line - display line shape
The chart also uses a couple functions from Underscore.js: