Scientific Data Visualization ICE-6 Working with react and d3.js
✓ Published0🌍 Public
SSravyaAnnadi
Last edited Jun 26, 2022
Created on Jun 26, 2022
This visualization displays the cumulative Monkey Pox cases for the top 20 countries, using a horizontal bar chart rendered as an SVG. The chart employs React’s `useState` and `useEffect` hooks to asynchronously fetch CSV data via `d3.csv`, then maps each country’s population count to bar widths using `d3.scaleBand` and `d3.scaleLinear` for the y- and x-axes. Gridlines and ticks are generated with `d3.scaleLinear.ticks`, and all visual elements are constructed through React DOM creation. The bars are styled pink via CSS, with blue axis labels and red gridlines.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed