Pie Chart unemployment across various U.S. states.
This interactive pie chart visualizes the proportion of unemployment across up to 30 U.S. states, with each slice sized by the state’s total unemployment percentage. Hovering a slice expands it and shows a tooltip with the state name, value, and percentage, while clicking a slice displays the selected state below the chart. A legend filters data by region on click and highlights matching slices on hover. Built with D3.js, it uses `pie`, `arc`, `scaleOrdinal`, and `transition.attrTween`-style animations, pulling data from the `@oabouhas/unemployment` package.
AI-generated descriptionThis project is a D3.js-based interactive pie chart visualization, showcasing the proportion of unemployment across various U.S. states. It leverages dynamic data filtering, interactive elements, and animations to create an engaging user experience.
Features Dynamic Data Representation
Visualizes the unemployment percentage for up to 30 states using a pie chart. Automatically calculates the proportion of each state based on total unemployment. Interactivity
Slice Hover Interaction: Hovering over a slice displays the state name, unemployment percentage, and value in a tooltip. Slices expand slightly when hovered over for better visibility. Legend Interaction: Hovering over a legend item highlights the corresponding slice in the chart. Clicking a legend item filters data dynamically by region. Click Interaction: Clicking a slice updates the chart with the selected state displayed prominently. Animations
Smooth transitions for slice expansion and retraction on hover. Gradual updates to the pie chart during data filtering.