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

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