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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more