Public
Edited
Oct 4, 2022
Fork of Blog Post
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { recentData } from "@eads/waves-on-my-beach"
Insert cell
Insert cell
Inputs.table(recentData)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Pluck the height measurement using the "find" method
heightMeasurement = recentData.find(
(row) => row.parameter_label === "Significant wave height (meters)"
)
Insert cell
Insert cell
beachStatusText = {
if (heightMeasurement.last_z > 1) {
// A score of >1 means the beach is likely to be closed
return "The beach is probably closed.";
} else {
// Otherwise, it's probably open
return "The beach is probably open.";
}
}
Insert cell
Insert cell
Insert cell
Insert cell
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