Public
Edited
Dec 21, 2021
Fork of GenderStats
3 stars
Insert cell
Insert cell
Insert cell
document.URL
Insert cell
params = new URL(document.URL).searchParams;
Insert cell
params.has("username")
Insert cell
params.get("username")
Insert cell
get_parameter = () => {
const params = new URL(document.URL).searchParams;
if (params.has("username")) {
return {
username: params.get("username"),
wikipedia: params.get("wikipedia")
}
}
else {
return {
username: "PAC2",
wikipedia: "fr.wikipedia.org"
}
}
}
Insert cell
get_parameter()
Insert cell
Insert cell
get_parameter().username
Insert cell
get_parameter().wikipedia
Insert cell
Insert cell
viewof username = Inputs.text({ label: "Pick a username", value: get_parameter().username })
Insert cell
viewof wikipedia = Inputs.select(["en.wikipedia.org", "fr.wikipedia.org", "de.wikipedia.org", "it.wikipedia.org", "nl.wikipedia.org", "es.wikipedia.org", "sv.wikipedia.org", "eo.wikipedia.org", "no.wikipedia.org", "ja.wikipedia.org", "ru.wikipedia.org"], {label: "Select a wikipedia project", value: get_parameter().wikipedia})
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