Public
Edited
Oct 26, 2023
6 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
salamanders
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.dot(salamanders, {
x: "totalLength",
y: d => d.weight, // You can use functions instead of "variableName"!
fill: "creekSection",
opacity: 0.5,
r: "totalLength",
// sort: {channel: "fill"},
tip: true
})
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.dot(salamanders, {
x: "totalLength",
y: d => d.weight,
fill: "creekSection", // Later, switch to totalLength to see continuous custom scheme!
opacity: 0.5,
r: "totalLength",
sort: {channel: "fill"},
tip: true
})
],
y: {type: "pow", exponent: 0.5},
x: {domain: [0, 400], ticks: 5, reverse: true},
color: {range: ["cyan", "purple"], legend: true},
grid: true
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.rectY(
salamanders,
Plot.binX(
{ y: "mean" },
{ x: "date", y: "totalLength", interval: "5 years"}
)
)
]
})
Insert cell
salamanders
X
date
Y
mean
totalLength
Color
mean
totalLength
Size
Facet X
Facet Y
Mark
bar
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
color: { legend: true },
marks: [
Plot.rectY(
salamanders,
Plot.binX(
{ fill: "mean", y: "mean" },
{ x: "date", y: "totalLength", fill: "totalLength", tip: true, interval: "5 years" }
)
),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
salamanders
X
Y
creekSection
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.barX(
salamanders,
Plot.groupY({ x: "count" }, { y: "creekSection", tip: true, fill: "reach"})
),
Plot.ruleX([0])
]
})
Insert cell
Insert cell
Insert cell
monoYearly
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Plot.plot({
marks: [
Plot.line(monoYearly, Plot.normalizeY({x: "year", y: "volume", basis: "first"})) // Try mean, min, last,!
],
marginLeft: 60,
x: {tickFormat: ""}
})
Insert cell
monoYearly
Insert cell
Plot.plot({
marks: [
Plot.line(monoYearly, Plot.normalizeY("first", {x: "year", y: "lake"}))
]
})
Insert cell
Insert cell
import {monoYearly} from "@observablehq/keep-saving-mono-lake"
Insert cell
mackCreekVertebrates.csv
SELECT
SAMPLEDATE as date
, SECTION as creekSection
, REACH as reach
, SPECIES as species
, LENGTH2 as totalLength
, WEIGHT as weight
FROM "mackCreekVertebrates"
WHERE SPECIES='DITE'
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