Skip to main content
100%

Homework 7: Horizon Chart

✓ Published0🌍 Public
YYang Shun Yu
Last edited Nov 5, 2023
Created on Nov 5, 2023

This example visualizes daily average air pollution levels for six pollutants across multiple districts over a selected year. The horizon chart technique uses stacked, color-coded bands to encode value magnitudes, with the number of bands adjustable via a dropdown. It loads data from a CSV file using d3.csv, transforms and aggregates measurements by date and district, and renders SVG axes and paths using d3.scaleTime, d3.scaleLinear, and d3.axisBottom. Users switch between years and band counts through interactive HTML select elements.

AI-generated description
MIT Licensed

Similar vizzes