Published
Edited
Dec 22, 2021
Insert cell
Insert cell
data = FileAttachment("penguins.csv").csv({typed: true})
Insert cell
incdomain = d3.extent(array.flatMap(d => [d.WEEKNUM, d.WEEKNUM]))
Insert cell
width = 1800
Insert cell
chart = Plot.plot({
width: width,
height: width,
clip: true,
facet:
{
data: array,
y: (d=>d.LONG_SHORT*-1),
//y: ((d=>d.Long_DMS*-1)),
x: (d=>d.LAT_SHORT*-1),
inset: 10,
},
fx: {
domain: [42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,80],
reverse: true,
},
fy:
{
//domain: [-8,-6,-4,-2,0,2,4,6,8,10,12,14,16],
},
y: {
//type:"symlog",
domain: [0,100],
//range: [0,10],
clamp: true,
},
r: {
range: [1,10]
},
color: {
type: "categorical",
domain: (["BOL","BRA","COL","ECU","FR1","GUY","PER","SUR","VEN"]),
scheme: "tableau10",
},
marks: [
Plot.ruleY([0],{stroke:"gray"}),
Plot.rectY(array,
Plot.binX({y: "sum", thresholds: 52
},
{
x: "WEEKNUM",
y: d=>d.FIRES_COUNT,
//y: d=>d.FIRES_COUNT/5,
sort: "doy",
fill: "#FA3817",
inset: -0.5,
})),
Plot.rectY(array,
Plot.binX({y: "sum", thresholds: 52
},
{
x: "WEEKNUM",
y: function(d)
{
return d.KMArea*10},
sort: "doy",
fill: "#e9ec59",
//stroke: "black",
//strokeWidth: 2,
//curve: "linear",
inset: -0.5,
})),
//Plot.frame({insetBottom: [30],fill:"black",mixBlendMode: "color-burn",}),

Plot.ruleX([49],{
stroke: "gray",
}
),
// Plot.link([0], {
// x1: () => incdomain[0],
// y1: () => incdomain[0],
// x2: () => incdomain[1],
// y2: () => incdomain[1],
// sort: "doy",
// //fill: "black",
// stroke: "gray",
// //strokeWidth: 2,
// //curve: "linear",
// inset: -0.5,
// }),
]
})
Insert cell
array =FileAttachment("Point_Fires_Defor_Merge@2.csv").csv({typed: true})
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