Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question 3

Public visualization

Viewing a saved revision (read-only)

40c586460836482d9d837edb61fc4891

Question 3

0 stars0🌍 Public
Sshivasaiamaravadi@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Activity-6

This scatter plot visualizes the relationship between BMI and insurance charges for 50 individuals, with red markers indicating smokers and blue markers for non-smokers. The code uses d3.csv to load inline CSV data, then applies d3.scaleLinear with d3.extent to map BMI and charges to screen coordinates. Axes are rendered using d3.axisLeft and d3.axisBottom, while circles are appended to an SVG canvas via d3.selectAll and data joins.

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.