Line Chart with Multiple Lines
This line chart displays one week of temperature data in degrees Celsius for cities worldwide, sourced from Data Canvas - Sense Your City, with each line representing a different city. The visualization aggregates the data using a nested hierarchy and renders the result as SVG paths, with color encoding to distinguish between cities. Built with D3 v5, the code uses `scaleTime`, `scaleLinear`, `scaleOrdinal`, and `nest` to process the data, while `axisBottom`, `axisLeft`, and a custom `colorLegend` module handle the axes and legend. The chart includes a time-based x-axis, a linear y-axis, and a categorical color scale with a legend.