Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart

Public visualization

Viewing a saved revision (read-only)

45d9cd9cc9b040a7a2d85bef7b5b2753

Bar Chart

0 stars0🌍 Public
Kkakumanusreya
Last edited Apr 8, 2023
Created on Apr 8, 2023
Forked from D3 Starter

This example visualizes hotel booking data from a cleaned CSV file, showing both the average price per year and the booking count per year in two separate pie charts. The code uses D3 version 6 to load the data, group it by year, and compute aggregate values. Each chart uses the d3.pie and d3.arc generators to create slices, with d3.scaleOrdinal and d3.schemeCategory10 for coloring. Interactive hover effects highlight slices by changing their fill color and scale, while legends display the year and corresponding values. The visualization is rendered as SVG elements.

AI-generated description

A demonstration of how to start using D3 version 6.