Pie chart RDW OWN CODE
✓ Published0🌍 Public
This example shows a pie chart displaying the distribution of parking area start years from RDW open data, where each slice represents a unique year value from the dataset. The visualization fetches JSON data from the RDW API, filters it to extract the first four characters of the `startdataarea` column, and identifies unique values before rendering the chart. Using D3 v6, the code employs `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` with the `schemeTableau10` color palette to generate SVG paths and labels. Text labels are placed using an inner arc centroid calculation.
AI-generated descriptionMIT Licensed