Published
Edited
Nov 29, 2021
Insert cell
viewof range = Inputs.range([100, 5], {label: "Amount", step: 5, value: 100})
Insert cell
Plot.plot({
//fill: "black",
width: width,
height: width/2,
x: {
//round: true,
//grid: true,
//ticks: csv.filter(d => d.Year),
},
y: {
//type: "log",
//grid: true,
//range: [0,100],
//round: true,
//reverse: true,
},
// fillOpacity:
// {
// range: [0,100]
//},
color: {
//type: "log",
//reverse: true,
domain: [0,100],
//base: 2,
range: ["yellow","black"]
},
r: {
//type: "log",
reverse: true,
round: true,
domain: [0,10],
//base: 2,
range: [0+(range/40),3]
},
marks: [
//Plot.frame({fill: "black"}),
Plot.dot(filter, Plot.binY({r: "median",
thresholds: 30},
{x: "2",
fill: "black",
r: "1",
//fillOpacity: 10,
y: "3",
//thresholds: 100,
//fill: "black",
}))

// 0 is ID
// 1 is VALUE
// 2 is LAT
// 3 is LONG
]
})
Insert cell
hfp = d3.csvParse(await FileAttachment("HFP_XY_4.csv").text(),({ID,VALUE,x,y}) => [ID,+VALUE,+x,+y])
Insert cell
filter = hfp.filter(function ([a,b],c,d) { return b <= range })
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