Public
Edited
May 8, 2024
1 fork
Insert cell
Insert cell
data = FileAttachment("bike-4.json").json()
Insert cell
Insert cell
hr = data.one_way_pds.filter(d => d.id === 'hr')[0]
Insert cell
wd = data.one_way_pds.filter(d => d.id === 'workingday')[0]
Insert cell
wd_values = wd.x_values
Insert cell
wd_pd = d3.zip(wd_values, wd['mean_predictions']).map(([x, y]) => ({ x, y }))
Insert cell
hr_values = hr.x_values
Insert cell
hr_ice_lines = hr.ice.ice_lines
Insert cell
pd = d3.zip(hr_values, hr['mean_predictions']).map(([x, y]) => ({ x, y }))
Insert cell
ice = hr_ice_lines.map((ice, i) => d3.zip(hr_values, ice).map(([x, y]) => ({ x, y, i }))).flat()
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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