Published
Edited
May 31, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Inputs.table( ) // Add the variable that contains your data between the parenthesis.
Insert cell
Insert cell
{}
Insert cell
Insert cell
Insert cell
Plot.plot({
height: 500,
marginLeft: 120,
y: {
domain: , // add your data here
},
marks: [
Plot.barX(sheepFixedNames, {
x: '', // add the variable that will go in the x axis here
y: '', // add the variable that will go in the y axis here
})
]
})
Insert cell
Insert cell
chart = {
const height = 500;
const margin = { top: 30, bottom: 30, left: 60, right: 30 };
const svg = d3.select(DOM.svg(width, height));

// Add your scales here
const xScale
const yScale

// Add your axes here
const xAxis

const yAxis

// Enter and append the data to the svg here
const g = svg
.append("g")
.selectAll("") // Select the shape you are going to append
.data() // Add your data here
.enter()
.append("rect") // Append your shape here
// Add your attributes and styles below

// Append your axes below

return svg.node();
}
Insert cell
Insert cell
{}
Insert cell
Insert cell
topojson = require("topojson-client@3")
Insert cell
d3 = require("d3@6")
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