Fork of Plot of Top 10 NASCAR Winners colored by Track
This stacked bar chart shows the top 10 NASCAR drivers by total wins between 1975 and 2003. Each bar is subdivided and colored by the specific race track where each win occurred, and a tooltip displays the track name and win count. Built with Vega-Lite and the Vega-Lite API, the visualization filters the dataset to only include drivers marked as “IsInTop10.” The bars are encoded using `markBar`, with the x-axis counting wins and color mapping to a predefined track domain.
AI-generated descriptionThis bar chart displays the top 10 drivers in terms of wins in the dataset, with the bars broken down and colored by their wins at particular tracks. So, for example, the driver Darrell Waltrip leads drivers during this time period with 84 wins, and those wins are split by the tracks they occured at. A tooltip was added to display the track name, and the number of wins there. In order to display just the top 10, a variable was added to the dataset called "IsInTop10" and added to rows for those drivers. This data comes from a rendition of the NASCAR dataset, which spans from 1975 to 2003.
Goal: When added to the dashboard, I would like this viz to highlight the portion of the bars pertaining to the selected track.