Public
Edited
Jun 6, 2023
Insert cell
Insert cell
data = FileAttachment("tree coordinates Znorm.csv").csv({ typed: true })
Insert cell
data.columns
Insert cell
d3.extent(data, (d) => d["Znorm"])
Insert cell
d3.extent(data, (d) => d["X"])
Insert cell
data.sort((a, b) => a["Znorm"] - b["Znorm"])[0]
Insert cell
Plot.plot({
// width,
height: 800,
y: { domain: [0, 100], grid: true },
x: { domain: [243_330, 243_370] },
marks: [
Plot.dot(
data
.filter((d) => d["Znorm"] > 0)
.filter((d) => d["X"] > 243332)
.filter((d) => d["X"] < 243368)
.sort((a, b) => a["Znorm"] - b["Znorm"]),
{
x: "X",
y: "Znorm",
opacity: (d) => (d["Znorm"] === 88.5 ? 1.0 : 0.1),
fill: (d) => (d["Znorm"] === 88.5 ? "red" : "green")
}
)
]
})
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