Public
Edited
Jun 28, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
parsed.map(d => d.date)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
tableData = parsed.map(({timestamp, date, themes}) => ({timestamp, date, ...themes.map(d => `${d.key}:${d.value}`)}))
Insert cell
Insert cell
Insert cell
flatData = parsed.map(({date, themes}) => themes.map(({key, value}) => ({ date, key, value }))).flat()
Insert cell
coronaData = flatData.filter(d => d.key.indexOf("Corona") > -1)
Insert cell
Insert cell
groupedData = d3.groups(flatData, d => d.key)
.sort(([, a], [, b]) => d3.descending(a, b))
Insert cell
groupedData.filter(d => d[0].indexOf("Corona") > -1)
Insert cell
Insert cell
Insert cell
themes2category = new Map(
await d3.csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vTLIkT1C1jEGyfgoW8IPGbBB5nJKWRXYDib_MMgVgpkObeLF3AbUn3oHm-vW9-WPfYQg5OeTPzN85-8/pub?gid=1582213456&single=true&output=csv")
.then(data => data.map(d => [d.thema, {korrektur: d.korrektur, kategorie: d.kategorie}]))
)
Insert cell
Insert cell
Insert cell
emptyCategories = flatDataCategory.filter(d => !d.key)
Insert cell
Table(d3.groups(flatDataCategory, d => d.key)
.sort(([, a], [, b]) => d3.descending(a, b)).map(d => ({thema: d[0], num: d[1].length})))
Insert cell
Insert cell
//Table(groupedData.map(d => ({thema: d[0], num: d[1].length, kategorie: themes2category.get(d[0]) })))
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