Skip to main content
100%

Penguins Dataset Scatter plot

✓ Published0🌍 Public
Ddheeraj1509
Last edited Mar 6, 2023
Created on Mar 6, 2023

A scatter plot visualizes the Palmer Penguins dataset, mapping flipper length to body mass for individual penguins. Each circle is colored by species (Adelie, Gentoo, or Chinstrap) and also encodes bill length and depth through its horizontal and vertical radii. Built with React and D3 v6, the example uses `d3.csv` to load data, `scaleLinear` and `extent` for axes, and `axisBottom` for the x-axis. A reusable `VizContainer` component applies the margin convention and renders the SVG.

AI-generated description

Boilerplate code for a React + D3 visualization with:

  • CDN links for React, ReactDOM, and D3
  • Basic React boilerplate
  • Variables for dimensions and margins
  • A VizContainer component that:
    • Abstracts SVG/group container elements
    • Follows the margin convention
    • Show the margins, which can be easily removed by deleting the showMargins={true} prop
MIT Licensed

Similar vizzes