Viewing a saved revision (read-only)
e9ea5001da7c4013b38189fb754e3547
Activity6_Question2
This stacked bar chart shows the percentage distribution of five rating levels across seven restaurants, using horizontally oriented bars where each segment represents a rating category. The visualization employs d3.stack() to compute stacked series from CSV data, d3.scaleBand() for the categorical y-axis, and d3.scaleLinear() for the percentage x-axis. Color encoding via d3.scaleOrdinal distinguishes rating bins, while mouseover events trigger tooltip displays showing exact percentage values. The SVG rendering includes axis labels, a title, and grid lines, with data sourced from dataQ2.csv.
AI-generated descriptionThe impact of category on ratings
This stacked bar chart gives the percentage of each rating level within different categories. The aim is to show the impact of category on ratings. When the mouse hovers over each bar, you can see pop-ups of accurate percentages of each rating level within each category. The total percentage is 1, representing 100%