Public
Edited
Jun 9, 2023
Fork of Untitled
Insert cell
Insert cell
Insert cell
viewof wikipedia = Inputs.text({
datalist: wikipedias,
label: "Choose a Wikipedia page project",
value: get_default().wikipedia,
placeholder: "eg fr.wikipedia.org",
submit: false
})
Insert cell
Insert cell
viewof article = SearchForm({
value: "Wikipédia",
placeholder: "Type to search...",
description: "Choose a wikipedia article",
suggestion: async (text) => {
const res = await d3.json(
`https://${wikipedia}/w/api.php?action=opensearch&format=json&search=${text}&namespace=0&limit=10&origin=*`
);
return res[1];
}
})
Insert cell
article2 = {
if (article == "") {
return get_default().article;
} else {
return article;
}
}
Insert cell
Insert cell
df = get_genderdiversity(article2, wikipedia).then((d) =>
aq.from(d).derive({ share: (d) => (100 * d.count) / op.sum(d.count) })
)
Insert cell
df.view()
Insert cell
Insert cell
import { SearchForm } from "@floatingpurr/input-autocomplete"
Insert cell
import {wikipedias} from "@pac02/user-level-gender-statistics-for-wikipedia"
Insert cell
Insert cell
import {get_genderdiversity} from "@pac02/gender-diversity-in-wikipedia-articles-evidence-from-some"
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