Public
Edited
Feb 23, 2024
Insert cell
Insert cell
## Classement des sondages par nombre de contributeurices
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { get_categorymembers } from "@pac02/sondages-frwiki-editors"
Insert cell
categories = get_categorymembers({
category: "Wikipédia:Sondage clos",
wikipedia: "fr.wikipedia.org"
})
Insert cell
cat_list = categories
.map((d) => d.title.replace("Catégorie:", ""))
.concat(["Wikipédia:Sondage en cours"])
Insert cell
all_closed_polls = await Promise.all(
cat_list.map((d) =>
get_categorymembers({
category: d,
wikipedia: "fr.wikipedia.org"
})
)
)
Insert cell
all_closed_polls_concat = [].concat.apply([], all_closed_polls)
Insert cell
all_closed_polls_concat.map((d) => d.title)
Insert cell
Insert cell
results = {
let aborted = false;
invalidation.then(() => (aborted = true));
const results = [];
for (const { title } of all_closed_polls_concat) {
if (aborted) break;
results.push(
await get_articleinfo({
article: title,
wikipedia: "fr.wikipedia.org"
})
);
}
return results;
}
Insert cell
df_results = aq
.table({
article: "",
watchers: NaN,
pageviews: NaN,
revisions: NaN,
editors: NaN
})
.union(results)
.derive({ name: (d) => op.replace(d.article, "Wikipédia:Sondage/", "") })
Insert cell
Inputs.table(df_results, { columns: ["name", "editors"] })
Insert cell
df_results.orderby(aq.desc("editors")).select(["article", "editors"]).view()
Insert cell
import { get_articleinfo } from "@pac02/look-at-your-list-of-created-articles-with-the-xtools-page-ar"
Insert cell
import { aq, op } from "@uwdata/arquero"
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