All examples By author By category About

sajudson

Interaction - Focus and Context using Zoom/Brush

The 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 mbostock's block: Brush & Zoom

Other sources of code include:

  • curran's block: Stylized Scatter Plot with Color Legend
  • sajudson's block: CS Degrees Awarded 1971-2011