Activity6-Task2
This stacked bar chart visualizes the impact of movie genre on IMDb ratings, showing the proportional distribution of five rating categories within each genre. The chart uses a horizontal layout with genres on the y-axis and percentage on the x-axis, where each bar segment represents a rating bracket. D3.js v7 and SVG render the visualization, with a tooltip displaying exact percentages on mouseover. The code utilizes d3.stack for data transformation, d3.scaleOrdinal for color encoding, and d3.axisBottom for the x-axis, with data sourced from a local CSV file.
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%.