Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Scatter Plot with Missing Data

Public visualization

Viewing a saved revision (read-only)

bfac8caf6c6949b8abc8e6554a248295

Scatter Plot with Missing Data

0 stars0🌍 Public
Mmelissastrong89@gmail.com
Last edited Mar 15, 2025
Created on Mar 15, 2025

This scatter plot displays penguin bill length versus flipper length, filtering out any records with missing values in either dimension. The chart uses D3 to render axes, labels, and semi-transparent circles over a gray plotting area. The dataset comes from the `@curran/penguins` package, and the filtering logic leverages JavaScript’s `Array.filter` and the `isNaN` function to exclude incomplete rows, ensuring only fully observed data points are plotted.

AI-generated description

A demonstration of how to filter out missing data, leveraging Array.filter and isNaN.

const filteredData = data.filter(
  (d) => !(isNaN(xValue(d)) || isNaN(yValue(d))),
);