Activity6_Question6
✓ Published0🌍 Public
This scatter plot visualizes the relationship between patient age and Na-to-K ratio, with each point colored by drug type. It loads a CSV dataset from a GitHub repository and renders an SVG using D3 v6. The code uses `d3.csv` for data loading, `d3.scaleLinear` for axes, `d3.axisBottom` and `d3.axisLeft` for tick marks, and `d3.scaleOrdinal` with `d3.schemeCategory10` for drug categories. A custom legend maps colors to drug names, and axis labels are added via appended text elements.
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.
MIT Licensed