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

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