Unlisted
Edited
Nov 26, 2022
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
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
Insert cell
Insert cell
rehoja
SELECT AVG(load), iso_year, iso_week FROM electricity_view GROUP BY iso_year, iso_week ORDER BY iso_year, iso_week
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
rehoja
SELECT COUNT(*), tree_age_total FROM trees WHERE NOT tree_age_total IS NULL GROUP BY tree_age_total ORDER BY tree_age_total ASC;
Insert cell
Insert cell
ages_chart = BarChart(tree_ages, {
x: d => d.tree_age_total,
y: d => d.count,
yDomain: [0, 800],
yFormat: "#",
yLabel: "↑ Frequency",
width,
height: 500,
color: "steelblue"
})
Insert cell
tree_ages
Insert cell
Insert cell
rehoja
SELECT AVG(temperature) as temperature, year FROM weather WHERE year < 2022 GROUP BY year ORDER BY year ASC;
Insert cell
average = temp_dat.filter(n => n.year > 1900 && n.year <=2000).reduce((total, next) => total + next.temperature, 0) / temp_dat.filter(n => n.year > 1900 && n.year <=2000).length
Insert cell
temp_dat.forEach(n => n.anomaly = n.temperature - average)
Insert cell
rehoja
SELECT week_start_day, riders FROM public_transport ORDER BY week_start_day ASC;
Insert cell
mobilityChart = Plot.plot({
y: {
grid: true,
label: "Fahrgäste im öffentlichen Verkehr"
},
x: {
label: ""
},
marginLeft: 50,
marks: [
Plot.line(public_transport, {x: "week_start_day", y: "riders", strokeWidth: 2, curve: "monotone-x", stroke: "#008f5d"})
]
})
Insert cell
rehoja
SELECT * FROM google_trends
Insert cell
Insert cell
googleTrendsPlot = Plot.plot({
y: {
label: "Relevanz"
},
x: {
label: ""
},
marks: [
Plot.ruleY([0]),
Plot.lineY(googleTrends.map(d => {return {relevance_100: +d.relevance_100, period_start: d.period_start}}), {x: "period_start", y: "relevance_100", strokeWidth: 2, stroke: "#f68512"})
]
})
Insert cell
Insert cell
tempPlot = Plot.plot({
y: {
label: "Temperaturanomalie",
grid: true
},
marks: [
Plot.ruleY([0]),
Plot.lineY(temp_dat, {x: "year", y: "anomaly", curve: "monotone-x", strokeWidth: 2, stroke: "#de3c82" })
]
})
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