Public
Edited
Jan 7, 2022
Insert cell
Insert cell
Insert cell
import {get_label} from "@pac02/user-level-gender-statistics-for-wikipedia"
Insert cell
get_label("Q6581072", "en")
Insert cell
get_label("Q6581072", "fr")
Insert cell
get_label("P31", "en")
Insert cell
Insert cell
import {get_labels} from "@pac02/what-kind-of-articles-have-you-created"
Insert cell
Insert cell
Insert cell
import {get_instanceof_fromsitelink} from "@pac02/what-kind-of-articles-have-you-created"
Insert cell
get_instanceof_fromsitelink("Economics", "enwiki")
.then(d => d.view())
Insert cell
Insert cell
import {get_gender} from "@pac02/user-level-gender-statistics-for-wikipedia"
Insert cell
get_gender("Ada Lovelace")
.then(d => get_label(d, "en"))
Insert cell
get_gender("Ada Lovelace", "frwiki")
.then(d => get_label(d, "en"))
Insert cell
get_gender("GROBID", "frwiki")
Insert cell
Insert cell
import {get_claim} from "@pac02/how-to-get-claims-from-wikidata-api-using-sitelinks"
Insert cell
fetch(wdk.getEntitiesFromSitelinks({titles: ["Economics", "Sociology", "Demography"], sites: "enwiki"}))
.then(d => d.json())
.then(wdk.parse.wb.entities)
.then(d => Object.values(d).map(q => get_claim(q, "P31", "enwiki")))
.then(
d => aq.from([ { article: "", qvalue: ""}])
.union(d.map(q => aq.from(q)))
.filter(aq.escape(p => p.article != ""))
)
.then(d => d.view())
Insert cell
Insert cell
WDK = require('https://bundle.run/wikibase-sdk@7.13.0')
Insert cell
wdk = WDK({
instance: 'https://www.wikidata.org',
sparqlEndpoint: 'https://query.wikidata.org/sparql'
})
Insert cell
import {aq, op} from "@uwdata/arquero"
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