data = fetch(
`https://query.wikidata.org/sparql?query=${encodeURIComponent(query)}`,
{ headers: { accept: "application/sparql-results+json" } }
)
.then((response) => response.json())
.then((d) =>
d.results.bindings.map((res) => ({
item: res.item.value,
itemLabel: res.itemLabel.value,
date: d3.utcParse("%Y-%m-%dT%H:%M:%SZ")(res.date.value)
}))
)