Public
Edited
Apr 25, 2023
Insert cell
Insert cell
Insert cell
import {Wrangler, op} from "@observablehq/data-wrangler"
Insert cell
Insert cell

import {data_raw} from "@datavisufs/import-and-parse-your-dataset-updated" // ... import the raw data cell from the previous notebook
Insert cell
Insert cell
Inputs.table(data_raw)
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
// To use copied code replace "data" with your own variable
final_data = aq.from(data_raw)
.orderby(aq.desc("temperature"))
.derive({temperatureNum: d => +d.temperature})
.filter(d => d["temperatureNum"] < 60.7)
.filter(d => d["temperatureNum"] > 55.6)
.derive({temperatureInCelcius: d => (d.temperatureNum - 32) * 5/9})
.select('date','temperatureNum','temperatureInCelcius')
.rename({temperatureNum: "temperatureInFahrenheit"})
.objects() // Uncomment to return an array of objects
Insert cell
Insert cell
Inputs.table(final_data)
Insert cell
Insert cell
Insert cell
import {imageToDo} from "@clokman/student-blocks"
Insert cell
imageToDo
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