Public
Edited
Jun 21, 2023
Importers
Insert cell
Insert cell
x = 2
Insert cell
y = 2 * x
Insert cell
Insert cell
viewof z = Inputs.range([0, 100], {label: "z", step: 1, value: 10})
Insert cell
x + y + z
Insert cell
Insert cell
viewof range = Inputs.range([59, 100], {label: "Amount", step: 1})
Insert cell
sampleData = FileAttachment("sample-data.fits")
Insert cell
import {readFITSTable} from "@dkirkby/fits"
Insert cell
data = readFITSTable(sampleData)
Insert cell
import {SummaryTable} from "@observablehq/summary-table"
Insert cell
summary = SummaryTable(data)
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: "Z", filter: selection})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
options
Insert cell
function selection(tgt) {
const isSouth = (tgt.TARGET_RA < 85) || (tgt.TARGET_RA > 300);
return (tgt.GMAG - tgt.RMAG > options.GRmin) &&
(tgt.ZMAG < options.ZMAGmax) &&
options.ttypes.includes(tgt.TARGET_TYPE) && (
(options.region == "All") ||
((options.region == "South") && isSouth) ||
((options.region == "North") && !isSouth));
}
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