Skip to main content
100%

Activity6_Task3 question

✓ Published0🌍 Public
AAP19110020041-Pavan Kumar
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This example shows a scatter plot of the Palmer Penguins dataset, displaying flipper length (mm) on the x-axis and body mass (g) on the y-axis, with each point colored by species (Adelie, Gentoo, or Chinstrap). The code loads CSV data from a GitHub gist and uses D3 v7’s `d3.csv`, `d3.scaleLinear`, `d3.scaleOrdinal`, and `d3.extent` to map the values, while `d3.axisLeft` and `d3.axisBottom` add labeled axes with rotated axis titles. Circles are appended to an SVG group with a margin-based layout, and the color scale assigns distinct pastel colors to each species.

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