Fork of Assignment 5: line chart with D3
This interactive line chart visualizes monthly airline delay statistics from 2003 to 2016, comparing carrier delays, late aircraft delays, and national aviation system delays. Users can filter by year range and toggle delay categories, with hover tooltips and brush zooming for detailed exploration. Built with D3.js v7, the visualization uses d3.line, d3.axisBottom, d3.axisLeft, and d3.brush to render SVG paths, axes, and interactive selection. Data is loaded from a CSV file and processed as time-series values, with animated transitions when filters change.
AI-generated descriptionAirline Delays Visualization
This interactive visualization displays airline delay data from 2003 to 2016, allowing users to explore trends in three types of delays:
- Carrier Delays
- Late Aircraft Delays
- National Aviation System Delays
Features
- Interactive time range selection
- Toggleable delay types
- Zoom and pan functionality
- Tooltips showing detailed delay information
- Responsive design that adapts to different screen sizes
- Statistical insights panel
Implementation
The visualization uses D3.js v7 for data binding, scales, and transitions. The code is organized into modular components:
index.html: Main structure and UI elementsstyles.css: Styling for the visualizationconfig.js: Configuration settingsdataService.js: Data loading and processingchartUtils.js: D3 chart utilitiesmain.js: Main application logic
Data Source
The data is sourced from a CSV file containing monthly airline delay statistics from June 2003 to July 2016. Each record includes counts for different types of delays.
Usage Instructions
- Use the time range dropdowns to select start and end years
- Toggle delay types using the checkboxes
- Hover over points to see detailed information
- Use brush to zoom into specific time periods
- Click "Reset View" to return to the original scale
Key Insights
The visualization reveals several interesting patterns:
- Seasonal variations in delays across all categories
- Correlation between different types of delays
- Long-term trends in airline performance
- Impact of major events on the airline industry
Future enhancements could include additional delay categories, weather correlation data, and airline-specific filtering.