Published unlisted
Edited
Feb 28, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
co2_data = {
let the_data = await FileAttachment("co2_data.json").json()
the_data.forEach(datum => {
datum.year = new Date(datum.year,0)
})
return the_data.map((d,t) => { return {...d, tdx:t} })
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof horizon_value = Inputs.range([1,30], {value: 5, step: 1, label: "Horizon Value"})
Insert cell
plot = {
let svg = d3.create('svg').attr('width', width).attr('height', height)
let g = svg.append('g')
.attr('transform', `translate(${margins.left},${margins.top})`)

return svg.node()
}
Insert cell
Insert cell
plot_view
Insert cell
Insert cell
Insert cell
margins = ({left:30, right:10, top:60, bottom:30})
Insert cell
plot_width = width-(margins.left+margins.right)
Insert cell
height = 700
Insert cell
plot_height = height - (margins.top+margins.bottom)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {drawdom} from '91007ee9d5fd152b'
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