D3.js Bar Chart
✓ Published0🌍 Public
This example analyzes Boston Airbnb listings, showing the number of unique hosts for each bed type in a bar chart and the distribution of cancellation policies among instant-bookable listings in a pie chart. The bar chart uses D3.js v4 with `d3.nest()`, `d3.set()`, `d3.scaleBand()`, and `d3.scaleLinear()` for aggregation and scaling, while the pie chart employs `d3.pie()` and `d3.arc()`. Both charts include hover effects, click alerts, and SVG-based rendering. Data comes from the included `airbnb_new.csv` file.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The data shown here comes from the UCI Machine Learning Repository: Auto MPG Data Set, via Gist: Scatter Plot with Menus.
MIT Licensed