Public
Edited
Jul 18, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Access gentoo data here:

Insert cell
// Access Adélie data here:

Insert cell
// Access chinstrap data here:

Insert cell
Insert cell
Insert cell
// Make combined version, penguinsCombo, here

Insert cell
Insert cell
Insert cell
// Create the wrangled version of penguins here:

Insert cell
Insert cell
// penguins = penguinsKeyCopy
Insert cell
Insert cell
Insert cell
import {aq, op} from "@uwdata/arquero"
Insert cell
Insert cell
// Convert your array of objects to an Arquero table here:

Insert cell
Insert cell
// Write Arquero code to perform the steps above here:

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {PlotMatrix} with {data} from "@observablehq/autoplot-matrix"
Insert cell
Insert cell
// Make a copy of penguins here, stored as data:

Insert cell
Insert cell
// Make the pairplot with PlotMatrix here:

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {scale} from "@chrispahm/hierarchical-clustering"
Insert cell
// Make a subset of penguins with complete cases (filter out values where bill length is null):

Insert cell
// Create a scaled version of the values (non-numeric will be NaN, which is fine..):

Insert cell
// Convert the array of objects to an array of arrays:

Insert cell
Insert cell
Insert cell
// Use ml.js KMeans() method to perform k-means clustering for k centroids:

Insert cell
Insert cell
// Combine the cluster values for each element with the original female penguins data:

Insert cell
Insert cell
Insert cell
Insert cell
ML = require("https://www.lactame.com/lib/ml/6.0.0/ml.min.js")
Insert cell
import {penguinsKeyCopy} from "@observablehq/ds-workflows-in-js-session-2-key"
Insert cell
noUse = FileAttachment("fiddlerCrabBodySize.csv") // Note: this is only added here so that the file is attached in the forked version
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more