Read in JSON department files
This interactive sunburst diagram visualizes student enrollment across university departments, courses, and modules, segmented by gender. The visualization aggregates three JSON data sources—department names, course pathways, and module records—into a hierarchical structure rendered as animated arcs. Using D3 v5’s `d3.partition` and `d3.arc`, the chart displays the hierarchy with color-coded segments for each department. Radio buttons allow filtering by department, triggering a transition that updates the displayed arcs. The code employs a `d3.hierarchy` with a `sum` accessor and a `d3.scaleOrdinal` with an interpolated rainbow color scheme.