activity6_question2.1
A stacked bar chart displays the distribution of IMDb ratings across six movie genres, with the x-axis showing the proportion of ratings within each of five score ranges from below 5.0 to above 8.5. The chart uses a horizontal layout where each genre’s bar is composed of color-coded segments that sum to 100 percent. The visualization is built with D3.js v7, using `d3.stack()` to compute the stacked values, `d3.scaleBand` for the genre categories, and a linear scale for the percentage axis. The data is loaded from a CSV file, with genre names mapped to the y-axis and a legend identifying each rating range.
AI-generated description🎥 Rating According to Genres - IMDb Visualization
This project visualizes IMDb movie ratings across different enres using a stacked bar chart created with D3.js.
📊 Dataset
Th e dataset includes the percentage of ratings for various g nres:
| Genre | below 5.0 | 5.0-6.5 | 6.5-7.5 | 7.5-8.5 | above 8.5 | |-- ---------|- | -------|- | ------| | -----|- | -----|- | --------| | Action | 0.3 | 0.2 | 0.2 | 0.2 | 0.1 | | Animation | 0.1 | 0.3 | 0.3 | 0.2 | 0.1 | | Romance | 0.2 | 0.3 | 0.2 | 0.1 | 0.2 | | Comedy | 0.3 | 0.2 | 0.2 | 0.2 | 0.1 | | Drama | 0.1 | 0.2 | 0.3 | 0.3 | 0.1 | | Documentary | 0.2 | 0.1 | 0.3 | 0.3 | 0.1 |
📈 Visualization Overview
X-Axis:* Percentage of ratings.
- Y-Axis: Movie genres.
- Color-Coded Segments: Different rating ranges.
- Legend: Identifies rating categories.
📊 Key Insights
- Ac tion and Comedy genres have a higher percentage of mov ies rated below 5.0.
- Drama and Documentary genres have a higher percentage of hig hly rated movies.
- Ratings between 6.5-7.5 and 7.5-8.5 dominate most genres.
🚀 How to Run
- Up
load the
index.html,style.css, anddata.csvfile s to VizHub. - Open the
index.htmlin a browser.
📚 Technologies Used
- D3.j s (v7)
- HTML5
- CSS3