Public
Edited
Dec 3, 2021
Importers
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
montebourg_occurences = watching.reduce((amt, t) => t.name === "Montebourg" ? t.location : amt, 0)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Je dois grave revoir cette fonction. C'est un peuu le coeur du truc car elle va chercher les occurences. J'aimerais bien avoir un pre traitement python, j'ai un peu de mal à faire ce que je veux en JS. Il faut faire attention aux "espace", aux occurences type @jeanlucmelenchon, à la présence des mots dans les urls etc...

function countOccurences(string, word) {
return string.split(word).length - 1;
// return (string.match(/word/g) || []).length
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { aq, op } from '@uwdata/arquero'
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