Public
Edited
Apr 24, 2023
Insert cell
Insert cell
Insert cell
Insert cell
myArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Insert cell
Insert cell
myArray.map((d) => d * 10)
Insert cell
Insert cell
myArray.filter((d) => d < 5)
Insert cell
Insert cell
Insert cell
// ... import the `myDataset` cell from the previous notebook as the 'ages' cell of this notebook
import { myDataset as ages } from "9e8f04b3c4dea457"
Insert cell
Insert cell
ages
Insert cell
Insert cell
Inputs.table(ages, { width: 750 })
Insert cell
Insert cell
ages.map((d) => d.name)
Insert cell
Insert cell
// filter() would be useful here
ages.filter((d) => d.name === "Gandalf")
Insert cell
// what would happen if you were to use `map()` instead of `filter()`? Try and find out.
ages.map((d) => d.name === "Gandalf")
Insert cell
Insert cell
// ... filter() could help here
ages.filter((d) => d.age > 20000)
Insert cell
Insert cell
ages.filter((d) => d.age < 1000)
Insert cell
Insert cell
Insert cell
import {imageToDo} from "@clokman/student-blocks"
Insert cell
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