Viewing a saved revision (read-only)
6bfb1249a01f4e98b017325f78246251
Activity6_Task2
This stacked bar chart shows the proportion of five taste categories—sour, bittersweet, sweet, very sweet, and extremely sweet—for five fruits: Apple, Banana, Orange, Mango, and Grapes. Each horizontal bar represents one fruit, segmented by taste category using a sequential color scale, with a legend on the right. Hovering over a segment displays a tooltip with the exact proportion value. The visualization is built with D3.js v7 using `d3.stack`, `scaleLinear`, and `scaleBand`, rendering as SVG, and loads data from a local CSV file.
AI-generated descriptionStacked Bar Chart for Cuisine Ratings
This project visualizes the distribution of cuisine ratings using a stacked bar chart created with D3.js. It demonstrates how different cuisines are rated across five rating ranges.
Dataset
The dataset used in this project contains ratings for five different cuisines:
- Italian
- Mexican
- Chinese
- Indian
- Japanese
Each cuisine is rated based on five rating ranges:
- Below 2.5
- 2.5 - 3.5
- 3.5 - 4.5
- 4.5 - 5.0
- Above 5.0
Sample Dataset
cuisine below 2.5 2.5-3.5 3.5-4.5 4.5-5.0 above 5.0
Italian 0.0802 0.2205 0.4003 0.2301 0.0689
Mexican 0.0527 0.1803 0.4107 0.2805 0.0758
Chinese 0.0951 0.2752 0.3805 0.1802 0.0690
Indian 0.1035 0.2517 0.3908 0.2104 0.0436
Japanese 0.0824 0.1983 0.3701 0.2680 0.0812