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

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