{"id":5877,"date":"2025-08-24T17:57:27","date_gmt":"2025-08-24T15:57:27","guid":{"rendered":"https:\/\/weblearning.co.za\/blog\/?p=5877"},"modified":"2025-09-23T13:05:45","modified_gmt":"2025-09-23T11:05:45","slug":"families-on-wikidata","status":"publish","type":"post","link":"https:\/\/weblearning.co.za\/blog\/families-on-wikidata\/","title":{"rendered":"Families on Wikidata\u00a0"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"659\" src=\"https:\/\/weblearning.co.za\/blog\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-24-174605-1024x659.png\" alt=\"\" class=\"wp-image-5946\" srcset=\"https:\/\/weblearning.co.za\/blog\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-24-174605-1024x659.png 1024w, https:\/\/weblearning.co.za\/blog\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-24-174605-300x193.png 300w, https:\/\/weblearning.co.za\/blog\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-24-174605-768x494.png 768w, https:\/\/weblearning.co.za\/blog\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-24-174605.png 1231w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">Kate (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q125298631\" target=\"_blank\" rel=\"noopener\">Q1252986310<\/a>)and Ravi (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q135189340\" target=\"_blank\" rel=\"noopener\">Q135189340<\/a>) are good friends with Dr Susan (<a href=\"http:\/\/orcid.org\/0000-0001-9554-4948\" target=\"_blank\" rel=\"noopener\">0000-0001-9554-4948<\/a>), who is our next-door neighbour here in Richmond (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q61359147\">Q61359147<\/a>). Our lives occasionally intersect<\/span> at birthday parties or tea. Their two gals also went to Parktown High School for Girls (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q7138735\">Q7138735<\/a>), like my two.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">None of these identifiers are as memorable as that of <a href=\"https:\/\/www.wikidata.org\/wiki\/Q1001\">Q1001<\/a> (Mahatma Gandhi). However, if you visit any Wikidata identifier, you can verify that they say who they are by either viewing their references. Or by using other identifiers, like Susan&#8217;s Orcid. You can see that we are a clutch of academics, journalists and activists. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These identifiers will also allow you to display a family tree (if the data is there). Want to show the links between father (<a href=\"https:\/\/www.wikidata.org\/wiki\/Property:P22\">P22<\/a>), mother (<a href=\"https:\/\/www.wikidata.org\/wiki\/Property:P25\">P25<\/a>), parent (<a href=\"https:\/\/www.wikidata.org\/wiki\/Property:P8810\">P8810<\/a>) and child (<a href=\"https:\/\/www.wikidata.org\/wiki\/Property:P40\">P40<\/a>). Visit GeneaWiki  <a href=\"https:\/\/magnus-toolserver.toolforge.org\/ts2\/geneawiki\/\">https:\/\/magnus-toolserver.toolforge.org\/ts2\/geneawiki\/<\/a> and enter Gandhi&#8217;s tripple identifier (Q1001). You will see the family tree in another format. Want to understand what&#8217;s going on behind the scenes? That&#8217;s where we start asking questions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> The linked data stored on the centralised data repository (Wikidata) is being used to construct a family chart, or tree. Another term for this arrangement of real-world entities is a &#8220;<a href=\"https:\/\/www.wikidata.org\/wiki\/Q1045785\">semantic network<\/a>&#8220;. All Wikimedia projects have the option to draw their information from this central place and construct a structure that encodes and represents knowledge. The infobox you see on a Wikipedia article is a neat way to present the basic facts of an article. That infobox might be filled with information presented on the page. Or the data could be pulled from Wikidata to create a knowledge graph (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q33002955\">Q33002955<\/a>). And this can be done in multiple languages. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now this is Mike&#8217;s (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q26207216\">Q26207216<\/a>) lovely <a href=\"https:\/\/commons.wikimedia.org\/wiki\/Commons:Wikidata_infobox_help\">infobox work,<\/a> and his <a href=\"https:\/\/www.wikidata.org\/wiki\/Wikidata:Infobox_Tutorial\">handy tutorial<\/a>. It&#8217;s how you can create a knowledge graph (I think). Here in South Africa (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q258\">Q258<\/a>), I have seen this Wikidata infobox in action on Afrikaans Wikipedia called {{<a href=\"https:\/\/af.wikipedia.org\/wiki\/Sjabloon:Databoks\">databoks<\/a>}}, on the siSwati Wikipedia called{{<a href=\"iThempleti:Umuntfu\">umuntfu<\/a>}} and the Xitsonga Wikipedia called {{<a href=\"https:\/\/ts.wikipedia.org\/wiki\/Template:Bio\">Bio}<\/a>}  The vernacular versions are undocumented. Pity. To quote an administrator: &#8220;Dit is &#8216;n gemors.&#8221; \u00a0<a href=\"https:\/\/af.wikipedia.org\/wiki\/Gebruiker:Oesjaar\">Oesjaar <\/a> is keeping growing the af community. Credit to him.   \u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As I become familiar with Wikidata, I think it&#8217;s necessary to learn how to query Wikidata directly for results. Instead of going through third-party code, use a language known as SPARQL (<a href=\"https:\/\/www.wikidata.org\/wiki\/Q54871\">Q54871<\/a>). I&#8217;m not going to try to create an infobox. I&#8217;m going to write a query (and credit to <a href=\"https:\/\/medium.com\/@emreeyukseel\/what-is-wikidata-and-how-to-query-with-sparql-6fa53b15848d\">Emre Y\u00fcksel <\/a>for his fine tutorial) that will draw on Wikidata to begin to show Ravi and Kate&#8217;s family tree (they asked me to assist in this matter).  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My task is to find the parents of Ravi. I&#8217;ll express this first in non-SPARQL terms.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT ? parent\nWHERE\n{\n?parent child Ravi\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ll use two or two identifiers in my query<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The father property &#8211;<a href=\"https:\/\/www.wikidata.org\/wiki\/Property:P22\">P22<\/a>, the child property <a href=\"https:\/\/www.wikidata.org\/wiki\/Property:P40\"> P40<\/a><\/li>\n\n\n\n<li>The identifier  &#8211; Ravi  Q135189340 <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"c3ec\">Then these prefixes will be added<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> Properties get prefixed with&nbsp;<code>wdt:<\/code><\/li>\n\n\n\n<li>Identifiers are prefixed with&nbsp;<code>wd:<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"c2be\">Let\u2019s combine these identifier properties and prefixes into our SPARQL query. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#find the parents of (Q135189340) \nSELECT ?parent\nWHERE\n{\n?parent wdt:P40 wd:Q135189340  \n} <a href=\"https:\/\/w.wiki\/F7oJ\">https:\/\/w.wiki\/F7oJ<\/a><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let me not deceive myself. This query seems pretty basic, and yet it has taken me a whole day to get it working smoothly. There are also many things I can&#8217;t figure out. For example, I&#8217;d actually like to express the names in the result. But I can&#8217;t quite get that right either.   <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT ?father ?fatherLabel\nWHERE\n{\n wd:Q135189340 wdt:P22 ?father\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"&#91;AUTO_LANGUAGE]\". }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output that I get from <a href=\"https:\/\/query.wikidata.org\/\">https:\/\/query.wikidata.org\/<\/a> is just another number. <\/p>\n\n\n\n<table><thead><tr><th>father<\/th><th>fatherLabel<\/th><\/tr><\/thead><tbody><tr><td>http:\/\/www.wikidata.org\/entity\/Q131561818<\/td><td>Q131561818<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s enough open thinking for the day. Please note that this is by no means definitive. I&#8217;m sure there are many mistakes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, a quick apology again for the weird technical glitch on Friday. I&#8217;m not sure what happened, but I&#8217;ve deleted the post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kate (Q1252986310)and Ravi (Q135189340) are good friends with Dr Susan (0000-0001-9554-4948), who is our next-door neighbour here in Richmond (Q61359147). Our lives occasionally intersect at birthday parties or tea. Their two gals also went to Parktown High School for Girls (Q7138735), like my two. None of these identifiers are as memorable as that of Q1001 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/weblearning.co.za\/blog\/families-on-wikidata\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Families on Wikidata\u00a0&#8220;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"episode_type":"","audio_file":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6,1],"tags":[204,203,205],"class_list":["post-5877","post","type-post","status-publish","format-standard","hentry","category-development","category-file","tag-charts","tag-family-trees","tag-wikidata","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts\/5877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/comments?post=5877"}],"version-history":[{"count":13,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts\/5877\/revisions"}],"predecessor-version":[{"id":5956,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/posts\/5877\/revisions\/5956"}],"wp:attachment":[{"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/media?parent=5877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/categories?post=5877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblearning.co.za\/blog\/wp-json\/wp\/v2\/tags?post=5877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}