Public
Edited
Oct 26, 2023
48 forks
Importers
72 stars
Insert cell
Insert cell
Insert cell
FileAttachment("temperature.csv")
Insert cell
Insert cell
FileAttachment("temperature.csv").text()
Insert cell
Insert cell
FileAttachment("temperature.csv").csv()
Insert cell
Insert cell
Insert cell
"62.7" + "59.9" // 122.6? Nope!
Insert cell
Insert cell
FileAttachment("temperature.csv").csv({typed: true})
Insert cell
Insert cell
Insert cell
1 + 1
Insert cell
name = "fred"
Insert cell
[...name].reverse().join("")
Insert cell
Insert cell
sum = {
let s = 0;
for (let i = 0; i < 10; ++i) {
s += i;
}
return s;
}
Insert cell
Insert cell
s // not defined!
Insert cell
Insert cell
data = {
const text = await FileAttachment("temperature.csv").text();
const parseDate = d3.utcParse("%Y-%m-%d");
return d3.csvParse(text, ({date, temperature}) => ({
date: parseDate(date),
temperature: +temperature
}));
}
Insert cell
Insert cell
d3.extent(data, d => d.date)
Insert cell
d3.extent(data, d => d.temperature)
Insert cell
Insert cell
import {Histogram} from "@d3/histogram"
Insert cell
Histogram(data, {value: d => d.temperature, width, height})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
height = 200
Insert cell
import {keyStyled} from "@mbostock/keys"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more