🌍 Public
Activity8_Question2
This chart shows the percentage distribution of monthly housing costs across five home types: Studio, Apartment, House-Owned, House-Rental, and Shared Space. Three cost brackets—below $1000, $1000–$3000, and above $3000—are displayed as stacked horizontal bars, with each segment colored according to a `d3.scaleOrdinal` color scale. The data, loaded from `MonthlyCostOfLiving.csv`, is processed using `d3.stack`. The SVG rendering uses `d3.axisBottom` and `d3.axisLeft` for axes, and an interactive tooltip appears on mouseover to show the exact percentage for each cost range.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed
Comments
Sign in to join the discussion.