Public
Edited
Mar 18, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
HTL-MAR-FiddlerCrabBodySize.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
crabs
Insert cell
Insert cell
crabsJS = crabs.map((d) => ({
lat: d.Latitude,
site: d['Site '],
airTempC: d.MATA,
sizeMm:d.carapace_width,
waterTempC:d.MATW
}))
Insert cell
Insert cell
Insert cell
viewof pickSize = Inputs.range([1,15],{step:1})
Insert cell
crabsJS
X
lat
Y
airTempC
Color
#79f659
Size
waterTempC
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
crabsJS
X
airTempC
Y
site
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
viewof color = Inputs.color({value:'#00ccff'})
Insert cell
Insert cell
Plot.plot ({
marks:[
Plot.dot (crabsJS, {
x: "airTempC", y: "sizeMm",
stroke: "orange",
fill: color, r: pickSize, opacity: 0.5,
tip: true
})
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [Plot.dot(crabsJS, { x: "lat", y: "sizeMm", tip: true })]
})
Insert cell
Insert cell
Insert cell
ML = require("https://www.lactame.com/lib/ml/6.0.0/ml.min.js")
Insert cell
Insert cell
crabsML = new ML. SimpleLinearRegression(
crabsJS.map(d => d.lat),
crabsJS.map(d => d.sizeMm)
)
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(crabsJS, { x: "lat", y: "sizeMm", tip: true }),
Plot.linearRegressionY(crabsJS, {x:'lat', y:"sizeMm"}),
Plot.frame(),
],
x: { label: "Latitude" },
y: { label: "Carapace size (mm)" }
})
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