Skip to main content
100%

Pie chart RDW OWN CODE

✓ Published0🌍 Public
SSergio Eijben
Last edited Nov 12, 2020
Created on Nov 11, 2020
Forked from Pie chart RDW

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 description
MIT Licensed

Similar vizzes