Temperature in San Francisco Line Chart
✓ Published2🌍 Public
A line chart visualizes one week of hourly temperature data in San Francisco, with each point representing a timestamp and its temperature in Celsius. The D3.js code uses `scaleTime` and `scaleLinear` for the axes, `axisBottom` and `axisLeft` for gridlines, and `line` with `curveBasis` to draw the smooth maroon curve. Tooltips display the exact temperature and date on mouseover, supported by the `d3.bisector` for nearest-point lookup and an SVG overlay rect that captures mouse events. Data is loaded via `csv` from a remote URL and rendered into an SVG canvas.
AI-generated descriptionThis line chart shows one week of temperature (in degrees Celcius) in San Francisco. The data comes from Data Canvas - Sense Your City.
Made in this video:
MIT Licensed