Activity 8_2
This stacked bar chart visualizes the impact of movie genre on rating distributions, showing the percentage of each rating level within genres. It uses D3 v7’s `d3.stack()` and `d3.scaleOrdinal()` to construct the stacked bars, with `d3.scaleBand()` for genre positioning and `d3.scaleLinear()` for the percentage axis. Mouseover events trigger tooltips displaying precise percentages for each rating segment. The SVG render uses data from a CSV file containing student test scores and demographic information.
AI-generated descriptionThe impact of genre on movie ratings
This stacked bar chart gives the percentage of each rating level within different movie genres. The aim is to show the impact of genre on movie ratings. When the mouse hovers over each bar, you can see pop-ups of accurate percentage of each rating level within each genre. Total percentage is 1, representing 100%.