Wikidata talk:WikiProject Genealogy/numbers/descendants

From Wikidata
Jump to navigation Jump to search

Sample check queries[edit]

SELECT
  ?subject ?subjectLabel ?dob 
  ?relative ?relativeLabel ?dob2
{ 
  BIND( wd:Q57224 as ?subject )
  ?subject wdt:P40+ ?relative . 
  ?subject wdt:P569 ?dob .
  ?relative wdt:P569 ?dob2 .
  FILTER (?dob > ?dob2 )
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Looks like some descendants include people born before the subject. I'm not sure how to identify the incorrect links.
--- Jura 14:52, 23 February 2018 (UTC)


SELECT
  ?subject ?subjectLabel ?dob 
  ?relative ?relativeLabel ?dob2
  ?parent ?parentLabel ?dob3 
{ 
  BIND( wd:Q57224 as ?subject )
  ?subject wdt:P40+ ?relative . 
  ?subject wdt:P569 ?dob .
  ?relative wdt:P569 ?dob2 .
  FILTER (?dob > ?dob2 )
  ?parent wdt:P40 ?relative .
  ?parent wdt:P569 ?dob3 .
  FILTER (?dob3 > ?dob2 )
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Maybe like the above Christina Hvide (Q952175) has the wrong mother. Also Elisabeth of Mansfeld-Hinterort (Q18206637) and Christian Günther I, Count of Schwarzburg-Sondershausen (Q329225).
--- Jura 14:57, 23 February 2018 (UTC)


SELECT ?depth ?item ?itemLabel ?dob2 ?dod2
WHERE
{
  BIND( wd:Q57224 as ?s ) 
  ?s wdt:P569 ?dob ; wdt:P570 ?dod .
  SERVICE gas:service {
    gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" ;
                gas:in wd:Q57224 ;
                gas:traversalDirection "Forward" ;
                gas:out ?item ;
                gas:out1 ?depth ;
                gas:maxIterations 100 ;
                gas:linkType wdt:P40 .
  }
  OPTIONAL { ?item wdt:P569 ?dob2 }
  OPTIONAL { ?item wdt:P570 ?dod2 }
  FILTER ( !BOUND(?dod2) || ?dod2 < ?dob )
  FILTER ( !BOUND(?dob2) || ?dob2 < ?dod )    
  FILTER ( !BOUND(?dod2) || ?dod2 < ?dob )    
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}

Try it!

One more step is needed: also Irene Lekapene (Q3656650) has the wrong mother/Princess Augusta Sophia of the United Kingdom (Q241233) a child centuries before. The above query identifies a few items that could have issues. As not all have DOB/DOD one has the search further.
--- Jura 15:39, 23 February 2018 (UTC)

I fixed the above in relation to Sophia of Hanover (Q57224). A few checks below for others.
--- Jura 21:15, 23 February 2018 (UTC)

Checks[edit]

There may be false positives due to a difference in time precision of the dates.

ancestor descendants
born before
ancestor
descendants
died < 50 years
before
ancestor
lists descendants who were
born before their
parent
Murong Huang (Q1069778): Prince Wenming of Yan

list

list

list

Alexander VI (Q108316): pope of the Catholic Church 1492–1503

list

list

list

Emperor Daowu of Northern Wei (Q1149178): Chinese emperor

list

list

list

Ibn Saud (Q151509): Founder of Saudi Arabia

list

list

list

Ptolemy I Soter (Q168261): Macedonian general

list

list

list

Muhammad Ali Pasha (Q182781): Wali of Egypt and Sudan

list

list

list

Jimmu (Q200188): Emperor of Japan

list

list

list

Cao Cao (Q204077): Chinese warlord during the Eastern Han Dynasty

list

list

list

Sextus Julius Caesar (Q2463039): Roman praetor 208 BC

list

list

list

Yellow Emperor (Q29201): one of the Three Sovereigns and Five Emperors

list

list

list

Charlemagne (Q3044): King of the Franks, King of Italy, and Holy Roman Emperor

list

list

list

Rama I (Q310992): King of Siam

list

list

list

Nurhaci (Q311189): Jurchen chieftain

list

list

list

Taejo of Goryeo (Q334312): founder of the Goryeo Dynasty

list

list

list

Sima Yi (Q353698): Chinese general, politician and regent

list

list

list

Bořivoj I (Q360116): Duke of Bohemia (9th century)

list

list

list

William the Conqueror (Q37594): first Norman King of England

list

list

list

Taejo of Joseon (Q378483): the first king of Joseon Dynasty in Korean history

list

list

list

King Dongmyeong of Goguryeo (Q378502): Korean king

list

list

list

Mayflower voyage (Q41967248): sea voyage from Plymouth, England to the New World in 1620

list

list

list

Isabella I of Castile (Q45859): queen of the Crown of Castile

list

list

list

Confucius (Q4604): Chinese teacher, editor, politician and philosopher

list

list

list

Kim Alji (Q483451): historical figure in Korean history

list

list

list

Hyeokgeose of Silla (Q484898): no description

list

list

list

Emperor Taizu of Liao (Q4989): emperor of the Liao Dynasty

list

list

list

Emperor Taizu of Jin (Q5060): Jin Dynasty emperor

list

list

list

Gustav I of Sweden (Q52947): King of Sweden

list

list

list

Sophia of Hanover (Q57224): Princess of the Palatinate, Electress of Hanover, heir presumptive and ancestor of British monarchs following the Act of Settlement 1701

list

list

list

John William Friso, Prince of Orange (Q62538): Stadtholder of Friesland and Groningen

list

list

list

King Wen of Zhou (Q698909): King of Zhou

list

list

list

Adam (Q70899): biblical figure in the Book of Genesis

list

list

list

Genghis Khan (Q720): founder and first emperor of the Mongol Empire

list

list

list

Zhao Hongyin (Q7209784): Chinese emperor's father

list

list

list

Emperor Gaozu of Han (Q7210): founding emperor of the Han Dynasty (256 BC - 195 BC)

list

list

list

Clovis I (Q82339): first king of the Franks (c. 466–511)

list

list

list

Osman I (Q83100): Ottoman sultan

list

list

list

Victoria (Q9439): British monarch who reigned 1837–1901

list

list

list

Muhammad (Q9458): Arabian religious leader and the founder of Islam

list

list

list

Emperor Gaozu of Tang (Q9700): founding emperor (618-626) of the Tang Dynasty

list

list

list

Hongwu Emperor (Q9957): founding emperor of the Ming Dynasty

list

list

list

Margaret of Brunswick-Lüneburg (Q92185): German noble

list

list

list

Discussion[edit]