# Using Observable to explore Wikidata

**URL:** <https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302>\
**Category:** Show and tell\
**Created:** [March 2, 2022, 8:41pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302 "2022-03-02T20:41:50Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [March 2, 2022, 8:41pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/1 "2022-03-02T20:41:50Z")

</div>

I think that Observable is a great tool to explore Wikidata.

Wikidata is a collaborative knowledge base. It’s a sister project for Wikipedia. Each Wikipedia article is linked to a Wikidata item. For instance, the Wikipedia article about [Florence Nightingale] ([Florence - Wikipedia](https://en.m.wikipedia.org/wiki/Florence) Nightingale) is linked to a [Wikidata item](https://m.wikidata.org/wiki/Q37103). Of course, the big advantage of Wikidata is that data is structured. It can be queried using [https://query.wikidata.org/](https://query.wikidata.org/) which uses the SPARQL syntax. [Query.wikidata.org](http://Query.wikidata.org) is very powerful but limited if you want to draw a visualisation or tell a story with the data.

Of course @mbostock has a nice [Hello Wikidata](https://observablehq.com/@mbostock/hello-Wikidata) notebook. @lukesmurray has a nice trick to show a query directly in the notebook without any javascript manipulation : [Using WikiData Sparql as a "Cell Mode" in Observable / Luke Murray / Observable](https://observablehq.com/@lukesmurray/wikidata-sparql-cell-mode-hack).

@piecesofuk has a nice notebook exploring UK government : [UK Parliament: Cabinet Ministers / piecesofuk / Observable](https://observablehq.com/@piecesofuk/uk-parliament-cabinet-ministers)

Since I really believe that Observable is great to explore Wikidata, I’ve written a small introduction for Wikidata users: [An introduction to Observable for Wikidata users / PAC / Observable](https://observablehq.com/@pac02/an-introduction-to-observable-for-wikidata-users?collection=@pac02/wikidata)

I also have some examples:

- Women and Nobel prize : [Women and Nobel prize / PAC / Observable](https://observablehq.com/@pac02/share-of-women-for-each-nobel-prize)
- All tour de France’s stage winners from 1903 to today : [Tour de France's stage winners / PAC / Observable](https://observablehq.com/@pac02/tour-de-frances-stage-winners?collection=@pac02/wikidata)
- A tool to explore gender biased labels in Wikidata : [Are occupation labels in Wikidata gender neutral? / PAC / Observable](https://observablehq.com/@pac02/gendered-labels-in-wikidata?collection=@pac02/wikidata)
- A tool to explore all statements about one item : [Wikidata's Q item explorer / PAC / Observable](https://observablehq.com/@pac02/wikidatas-q-item-explorer?collection=@pac02/wikidata)

Of course Wikidata and SPARQL are also useful to explore Wikipedia:

- We can explore featured articles in Wikipedia in French : [Celebrating the 2,000 featured articles milestone in Wikipedia in French / PAC / Observable](https://observablehq.com/@pac02/celebrating-the-2-000-featured-articles-milestone-in-wikip?collection=@pac02/wikipedia)
- It can also be used to explore gender diversity in Wikipedia articles [Gender diversity in Wikipedia articles: evidence from some selected academic disciplines in the English Wikipedia / PAC / Observable](https://observablehq.com/@pac02/gender-diversity-in-wikipedia-articles-evidence-from-some?collection=@pac02/gender-diversity-in-wikipedia-articles) and [Explore gender diversity in a single Wikipedia article / PAC / Observable](https://observablehq.com/@pac02/explore-gender-diversity-in-a-single-wikipedia-article?collection=@pac02/gender-diversity-in-wikipedia-articles).

I’m sure that there are lots of other great examples and I’d really be interested in creating more bridges between Observable and Wikidata communities.

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [March 4, 2022, 9:10pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/2 "2022-03-04T21:10:04Z")

</div>

SPARQL is not the only way to retrieve data from Wikidata. There is also an API. Here are some functions using Wikidata API: [Wikidata API / PAC / Observable](https://observablehq.com/@pac02/wikidata-api?collection=@pac02/wikidata)

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [March 12, 2022, 6:49am UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/3 "2022-03-12T06:49:42Z")

</div>

A new notebook which look at the history of the tour de France using a query from Wikidata : [Tour de France's history at a glance / PAC / Observable](https://observablehq.com/@pac02/tour-de-frances-history-at-a-glance)

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [March 16, 2022, 8:23pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/4 "2022-03-16T20:23:00Z")

</div>

Observable users interested in discovering Wikidata and SPARQL may have a look at the SPARQL wikibook : [SPARQL - Wikibooks, open books for an open world](https://en.m.wikibooks.org/wiki/SPARQL) and the Wikidata introduction [Wikidata:Introduction - Wikidata](https://m.wikidata.org/wiki/Wikidata:Introduction)

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [June 2, 2022, 7:35pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/5 "2022-06-02T19:35:26Z")

</div>

Here is a new notebook [Article's wikilinks inspector / PAC / Observable](https://observablehq.com/@pac02/articles-wikilinks-inspector?collection=@pac02/wikipedia-tools) which provides insight about all entities named in a Wikipedia article.

It’s useful to compare articles. For instance, you can see that Sociology in English cites 53 Americans ([Article's wikilinks inspector / PAC / Observable](https://observablehq.com/@pac02/articles-wikilinks-inspector?wikipedia=en.wikipedia.org&article=Sociology&claim=P27&lang=en)) whereas the corresponding article in French cites a majority of French people ([Article's wikilinks inspector / PAC / Observable](https://observablehq.com/@pac02/articles-wikilinks-inspector?wikipedia=fr.wikipedia.org&article=Sociologie&claim=P27&lang=en)). Both article are about the same topic but the content is different.

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [July 25, 2022, 8:07pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/6 "2022-07-25T20:07:35Z")

</div>

New tool to explore gender diversity in Wikipedia [Gender diversity inspector / PAC / Observable](https://observablehq.com/@pac02/gender-diversity-inspector?collection=@pac02/wikipedia-tools). It now filter on birthdate.

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [September 3, 2022, 7:54pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/7 "2022-09-03T19:54:11Z")

</div>

I have collected a dataset including 2,400 SPARQL queries : [Hello SPARQL queries dataset / PAC / Observable](https://observablehq.com/@pac02/hello-sparql-queries-dataset)

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [September 14, 2022, 7:21pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/8 "2022-09-14T19:21:31Z")

</div>

I have some new notebooks:

- a tribute to Jean-Luc Godard [Tribute to JLG / PAC / Observable](https://observablehq.com/@pac02/tribute-to-jlg)
- a visualisation of Tour de France’s stage winners [All Tour de France's stage winners by country of citizenship with flag / PAC / Observable](https://observablehq.com/@pac02/all-tour-de-frances-stage-winners-by-country-of-citizenship?collection=@pac02/wikidata)
- a visualisation of Vuelta’s stage winners [All Vuelta's stage winners by country of citizenship / PAC / Observable](https://observablehq.com/@pac02/all-vueltas-stage-winners-by-country-of-citizenship?collection=@pac02/wikidata)

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [October 6, 2022, 8:33pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/9 "2022-10-06T20:33:39Z")

</div>

The work of the recent Nobel laureate Annie Ernaux in one notebook : [Tribute to Annie Ernaux / PAC / Observable](https://observablehq.com/@pac02/tribute-to-annie-ernaux)

---

<div class="post-metadata">

**Author:** ![waynesutton](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/waynesutton/32/5040_2.png) [@waynesutton](https://talk.observablehq.com/u/waynesutton)\
**Post date:** [October 6, 2022, 11:51pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/10 "2022-10-06T23:51:36Z")

</div>

@pac02 thanks for sharing the examples!

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [October 7, 2022, 8:18pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/11 "2022-10-07T20:18:00Z")

</div>

Tonight’s dataviz shows all Nobel laureates by gender : [All Nobel laureates by gender and by year / PAC / Observable](https://observablehq.com/@pac02/all-nobel-laureates-by-gender-and-by-year).

---

<div class="post-metadata">

**Author:** ![waynesutton](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/waynesutton/32/5040_2.png) [@waynesutton](https://talk.observablehq.com/u/waynesutton)\
**Post date:** [October 7, 2022, 8:43pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/12 "2022-10-07T20:43:38Z")

</div>

@pac02 hi are you presenting these notebooks anywhere or just sharing your learnings?

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [October 8, 2022, 5:22pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/13 "2022-10-08T17:22:50Z")

</div>

I essentially share my notebooks with the Wikidata community, most often in the weekly newsletter [Wikidata:Status updates - Wikidata](https://m.wikidata.org/wiki/Wikidata:Status_updates).

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [October 11, 2022, 8:07pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/14 "2022-10-11T20:07:12Z")

</div>

I’ve tried a new visualization : all the works published by Nobel laureates in literature by age in one dataviz : [Career of Nobel laureates in literature / PAC / Observable](https://observablehq.com/@pac02/career-of-nobel-laureates-in-literature)

There is some overlap. So it’s not perfect. Any idea to improve this graph is welcome.

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [October 30, 2022, 1:57pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/15 "2022-10-30T13:57:38Z")

</div>

Yet another example : [https://observablehq.com/@johnsamuelwrites/make-Wikidata-also-colorful](https://observablehq.com/@johnsamuelwrites/make-Wikidata-also-colorful) by @johnsamuelwrites.

@johnsamuelwrites has written nice functions to extract values from the query. I’ll try to reuse them in the future.

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [December 30, 2022, 8:17pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/16 "2022-12-30T20:17:50Z")

</div>

Here is a thread of 24 visualizations for the advent : [PAC2: "I'll try to post each day a dataviz related to #W…" - vis.social](https://vis.social/@pac2/109439887189554603). It includes visualization of Wikipedia and Wikidata.

---

<div class="post-metadata">

**Author:** ![pac02](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@pac02](https://talk.observablehq.com/u/pac02)\
**Post date:** [January 30, 2023, 10:22pm UTC](https://talk.observablehq.com/t/using-observable-to-explore-wikidata/6302/17 "2023-01-30T22:22:09Z")

</div>

Here is a hashtag which allows to find all notebooks using Wikidata [This notebook is a fork](https://observablehq.com/tag/wikidata?filter=recent)
