Published
Edited
Nov 29, 2021
Insert cell
Insert cell
viewof range = Inputs.range([1, 15], {label: "Day", step: 1, value: 1})
Insert cell
chart = Plot.plot({
height: 800,
width: 900,
marginLeft: 20,
// facet: {
// data: array,
// x: "Day",
// },
x: {
axis: null,
//range: [0,1000],
align: 1,
},
y: {
axis: null,
round: true,
//range: [0,600],
align: -20,
},
color:
{
domain: [0,100],
range: ["black","yellow"],
},
r:
{
domain: [0,10],
range: [0,4],
},
marks: [
Plot.frame({fill: "#eee"}),
Plot.cell(d_Filter,
Plot.bin({fill: "count", thresholds: 30},
{
x: "X",
y: "Y",
//r: "Value",
//fill: (function (a,b,c) {return a.Day <= range})
}))
]
})
Insert cell
array = FileAttachment("Bra_Fires_Aug_15.csv").csv({typed: true})
Insert cell
table = d3.csvParse(await FileAttachment("Bra_Fires_Aug_15.csv").text(),({ID,Value,X,Y}) => [ID,+Value,+X,+Y])
Insert cell
d_Filter = array.filter(function (a,b,c) {
return a.Day <= 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