Viewing a saved revision (read-only)
871cb21163ec463b8bc9d2000b49ba0c
Visualising SDG budget Nepal
This example visualizes Nepal’s 2020 budget allocations toward the Sustainable Development Goals (SDGs) using a donut chart. Each slice represents an SDG, with a legend and tooltips (via SVG `<title>`) showing the goal name, allocated amount in lakhs, and percentage. The code loads CSV data using `d3.csv`, computes pie angles with `d3.pie()`, and draws arcs with `d3.arc()`, while React (with hooks like `useState` and `useEffect`) manages the rendering. Colors are assigned via `d3.scaleOrdinal`, and the SVG output includes interactive hover details.
AI-generated descriptionA program that loads in some data about budget that leads towards SDG of Nepal 2020 using D3 utilities, and uses React to render data.
its in progress