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)[reply]


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)[reply]


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)[reply]

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

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 from the Borgia family

list

list

list

Emperor Daowu of Northern Wei (Q1149178): founding emperor of Northern Wei (during the Northern dynasties period, China)

list

list

list

Ibn Saud (Q151509): Founder of the Kingdom of Saudi Arabia (1877–1953)

list

list

list

Ptolemy I Soter (Q168261): Macedonian general, ruler of Egypt

list

list

list

Muhammad Ali of Egypt (Q182781): Albanian Ottoman commander and Wali of Egypt and Sudan (1769–1849)

list

list

list

Jimmu (Q200188): legendary first emperor of Japan

list

list

list

Cao Cao (Q204077): Chinese warlord and statesman (155–220)

list

list

list

Sextus Julius Caesar (Q2463039): Roman praetor 208 BC

list

list

list

Yellow Emperor (Q29201): Legendary Chinese ruler, one of the Five Emperors, later worshipped as a god

list

list

list

Charles the Great (Q3044): king of Franks, regarded as the first Holy Roman Emperor (747–814)

list

list

list

Buddha Yodfa Chulaloke (Q310992): King of Siam (1737–1894)

list

list

list

Nurhaci (Q311189): Jurchen chieftain of Later Jin, founder of Qing Dynasty (1559 - 1626)

list

list

list

Taejo of Goryeo (Q334312): founder of the Goryeo Dynasty (877-943)

list

list

list

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

list

list

list

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

list

list

list

William the Conqueror (Q37594): King of England, Duke of Normandy (c. 1028-1087)

list

list

list

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

list

list

list

King Dongmyeong of Goguryeo (Q378502): 1st century BC founding monarch of the kingdom of Goguryeo

list

list

list

Mayflower voyage (Q41967248): sea voyage from Plymouth, England to North America between September–November 1620

list

list

list

Isabella I of Castile (Q45859): queen of the Crown of Castile, from 1474 to 1504; first queen of a dynastically-united Spain, from 1479 to 1504

list

list

list

Confucius (Q4604): Chinese philosopher and politician (551–479 BCE)

list

list

list

Kim Alji (Q483451): 1st-century CE Korean historical figure

list

list

list

Hyeokgeose of Silla (Q484898): 1st-century BC founding monarch of the Korean kingdom of Silla

list

list

list

Emperor Taizu of Liao (Q4989): Emperor of the Khitans and founder of the Liao dynasty (872-926)

list

list

list

Emperor Taizu of Jin (Q5060): Jin Dynasty emperor (1068-1123)

list

list

list

Gustav I of Sweden (Q52947): King of Sweden from 1523 to 1560

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 (Q62538): Stadtholder of Friesland and Groningen (1687-1711)

list

list

list

King Wen of Zhou (Q698909): King of Zhou

list

list

list

Adam (Q70899): first man according to the Abrahamic creation and religions such as Judaism, Christianity, and Islam

list

list

list

Genghis Khan (Q720): founder and first khan of the Mongol Empire (1162–1227)

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–195 BC)

list

list

list

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

list

list

list

Osman I (Q83100): Founder of the Ottoman Empire (died 1323/4)

list

list

list

Victoria (Q9439): Queen of the United Kingdom from 1837 to 1901

list

list

list

Muhammad (Q9458): founder and main prophet of Islam (c. 570–632)

list

list

list

Emperor Gaozu of Tang (Q9700): Founding emperor of the Tang Dynasty (566-635) (r. 618–626)

list

list

list

Hongwu Emperor (Q9957): founding emperor of China's Ming dynasty; ruled 1368–1398

list

list

list

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

list

list

list

Discussion

[edit]