Skip to main content
100%

Activity6_Question6

✓ Published0🌍 Public
KKhushi Desai
Last edited Oct 19, 2024
Created on Oct 19, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes