Skip to main content
100%

NASCAR Scatterplot With Dropdown, Filter

✓ Published3🌍 Public
RRobert Johnson
Last edited Nov 17, 2021
Created on Nov 3, 2021

This interactive scatterplot displays NASCAR race winner statistics from 1975 to 2003, plotting year on the x-axis against a user-selectable y-axis metric, including starting position, payout, caution flags, lead changes, and winning time. A dropdown menu from ReactDropdown enables switching between these attributes, while points are colored by track name using a d3.scaleOrdinal color scale. Hovering over the color legend highlights data points for a selected track and fades others to 12% opacity. The visualization uses d3.scaleTime and d3.scaleLinear scales, renders SVG circles via React components, and loads CSV data with d3.csv.

AI-generated description

This scatterplot is an expansion on a previous viz I created that shows NASCAR winners by starting position, split by year. This plot colors the points by the track name, adds a dropdown and a legend. The dropdown allows for the selection of different statistics pertaining to the race winners. In addition, hover capability has been added so that hovering over a track in the legend will highlight all of the dots pertaining to that track. These edits will provide the viewer with an opportunity to look for patterns among tracks and track types, and among several different variables. This data comes from a rendition of the NASCAR dataset, which spans from 1975 to 2003.

MIT Licensed

Similar vizzes