🌍 Public
Viewing a saved revision (read-only)
2a59b7fec6bf4f5d8661ed66ce2b831e
Fork of Activity 7
This example shows the distribution of applicant incomes for approved loans using a pie chart, with each slice colored according to income level and a legend mapping loan IDs to their corresponding income values. The visualization fetches CSV data from a remote GitHub gist using `d3.csv`, then computes the pie layout with `d3.pie()` and renders SVG paths via `d3.arc()`; the color scale is built with `d3.scaleOrdinal`. The legend text is formatted with `d3.format` to display values in thousands, and the SVG canvas is selected and manipulated through `d3.select`.
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.