Question 2
✓ Published1🌍 Public
A city-by-city temperature comparison appears as an area chart, with a single smooth region filled beneath the curve to highlight overall values across categorical x-axis labels. D3 v7 loads CSV data from a GitHub gist via `fetch` and `d3.csvParse`, then builds an SVG with `d3.scaleBand` for the cities on the x-axis and `d3.scaleLinear` for temperature on the y-axis, using `d3.area` to generate the filled path. Rotated city names and labeled axes (“Temperature (°C)” and “Cities”) clarify the mapping, while the rendering relies on standard SVG elements and D3’s `axisBottom`, `axisLeft`, and `scaleOrdinal` APIs.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed