The Visualization
This visualization explores the relationship between daily bike-sharing user counts and weather in Washington DC, using a focus and context idiom. The context chart displays total users over the full date range, while a brushed and zoomable focus chart shows casual and registered users alongside temperature. Users can pan and zoom via a one-dimensional brush, and a geometric zoom on the focus chart updates the context brush. Built with D3 v4, it uses `d3.brushX`, `d3.zoom`, and `d3.line` to render SVG line charts from the UCI Machine Learning Repository dataset.
AI-generated descriptionThe Visualization
This is part of an exploratory visualization project looking at the time of day use patterns and the relationship between the number of users and quantitative weather attributes (temperature, humidity and windspeed).
The Interaction
This visualization implements two interactions, a one dimensional brush and zoom, as part of a focus and context idiom.
The context portion of the vis is a simple black and white line chart showing the total daily bike share users vs date. It is located at the bottom the visualization, and always shows the full range of dates for which data exists.
The focus portion of the visualization is a line chart showsing the daily casual and registered users (left hand Y scale as well as temperature (right hand Y scale). The x axis is the date.
The brush on the context chart controls the date range displayed on the focus chart. The brush allows the user to zoom by dragging the left or right edge of the brush and to pan by selecting the a point inside the brush and dragging it. The focus chart is rescaled and redrawn as the date range covered by the brush changes.
The focus chart includes a geometric zoom interaction that is accessed using the scroll wheel on the mouse. This zoom feature updates the brush on the context chart to show what portion of the date range is displayed on the focus chart.
The Data
Washington DC Bike Sharing Data Set
This data set contains the number of bike share system users (casual and registered) for each day (and hour) for two years (Jan 2011 - Dec 2012), as well as the day type (holiday, workingday), weather situation, temperature and humidity, apparent temperature and windspeed.
This data is from UCI Machine Learning Repository: Bike Sharing Data Set
The dataset file can be found here as a zip archive.
Daily Data Block Summary Hourly Data Block Summary
Sources and Inspirations
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/34f08d5e11952a80609169b7917d4172'>Brush & Zoom</a>
Other sources of code include:
<li><a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/ecb09f2605c7fbbadf0eeb75da5f0a6b'>Stylized Scatter Plot with Color Legend</a> <li><a href='http://bl.ocks.org/sajudson/'>sajudson</a>'s block: <a href='http://bl.ocks.org/sajudson/159113faca3611883a34bdaf460c020a'>CS Degrees Awarded 1971-2011</a>forked from <a href='http://bl.ocks.org/sajudson/'>sajudson</a>'s block: <a href='http://bl.ocks.org/sajudson/a0713fb9826aea45f15b207dfec9bcb4'>Interaction - Focus and Context using Zoom/Brush</a>