Activity6_Task2
This stacked bar chart shows the distribution of video game sales across ten genres, broken down by platform (PS2, DS, Wii, X360, PS3, PC, and Other). Each bar represents total global sales for a genre, with colored segments indicating platform contributions. The visualization uses d3.tsv to load tab-separated data, d3.scaleOrdinal with d3.schemeCategory10 for colors, and interactive tooltips that appear on mouseover to display segment details. A legend identifies the platform colors, while axes display genres and sales values in millions.
AI-generated descriptionUber Trip Purposes Analysis
This visualization displays a stacked bar chart showing the breakdown of Uber trip purposes by starting location. The chart highlights:
- Top starting locations by total mileage
- Breakdown of miles by trip purpose at each location
- Interactive tooltips with detailed information
Features
- Responsive design with modern styling
- Interactive tooltips showing detailed information
- Color-coded trip purposes with a clear legend
- Total miles label for each location
Data Structure
The visualization uses data from data.csv that includes:
- START_DATE, END_DATE: Date and time of trip
- CATEGORY: Trip category (e.g., Business)
- START, STOP: Start and end locations
- MILES: Distance traveled
- PURPOSE: Purpose of the trip (e.g., Meeting, Customer Visit)
Implementation
Built using D3.js v7, the visualization:
- Processes the raw data to extract top starting locations
- Creates stacked bars for different trip purposes
- Implements interactive elements for better user experience