User:Glrx
Need to learn how to...[edit]
Collapse identical items[edit]
See Help:Merge.
- Howland Island. Both of these are P31 an instance of island (Q23442)
- Howland Island (Q131305), an island at 0°48'24"N, 176°36'59"W, GeoNames Id: 5854922 (Island)
- Howland Island (Q31920484), a (supposedly different) island at 0°48'47.88"N, 176°37'4.84"W, GeoNames Id: 5854921 (Adminstrative region)
- Carcharodon megalodon
- megalodon (Q163873) instance of fossil taxon (Q23038290)
- Carcharodon megalodon (Q16107846) instance of fossil taxon (Q23038290) and synonym of megalodon (Q163873)
- Arad
- Arad (Q173591) city in Romania
- Arad (Q16898082) locality in Romania
- Rectum
- rectum (Q158716) part of (P361) rectum (Q1340255) (statement flagged)
- rectum (Q1340255)
- Rhone
- Garonne
- John Leigh Douglas
- rear admiral
- Bedford Brown
- Gacrux
- Gacrux (Q14233) RA 187.791498376 degree decl −57.113213457 degree J2000.0
- Gacrux (Q76161747) RA 187.791498376 degree decl −57.113213457 degree J2000.0
- Rigil Kentaurus
- Alpha Centauri (Q12176) RA 219.873833060 degree decl −60.832221940 degree J2000.0
- Alpha Centauri A (Q2090157) RA 219.902058332 degree decl −60.833992688 degree J2000.0
- Zuben’ubi
- Alpha Librae (Q13047) RA 222.72000 degree decl −16.04167 degree J2000.0
- Alpha2 Librae (Q12065240) RA 222.719637892 degree decl −16.041776520 degree J2000.0
- Shaula
- Lambda Scorpii (Q13023) RA 263.402167184 degree decl −37.103823551 degree J2000.0
- Shaula (Q78603928) RA 263.402167 degree decl −37.103833 degree J2000.0
- progranulocyte
- Pomichna
Resolve part issues[edit]
- Cartridge cartridge (Q37144). has part(s) (P527)
- primer primer (Q7243398)
- percussion cap percussion cap (Q614853) (technically not part of a cartridge)
- Valve stem valve stem (Q1206759)
Correct errors[edit]
The en.description for dusk is the end of astronomical twilight. It has the dusks (and presumably the dawns) be instants the same as sunrise and sunset. So meeting somebody at dawn is meeting them at first light (not anytime before sunrise). So dusks are moments when a twilight begins or ends. Twilights are time intervals. Google translate has German using twilight for dusk and dawn; dusk transliterates to evening twilight and dawn is morning twilight.
- dusk (Q11288132) dusk (mashes civil, nautical, and astronomical dusk together)
- twilight (Q164160) twilight (no distinction for civil, nautical, and astronomical)
- dawn (Q11326182) dawn (no distinction)
- horizon (Q43261) horizon
wikt:dawn is also troubling. It says sunrise is a synonym, dusk is an wikt:antonym, and twilight is a wikt:hypernym (less specific term). It says the civil dawn, astronomical dawn, and nautical dawn are wikt:hyponyms (more specific term). Sunrise is an instant near the end of civil twilight; civil dawn is the instant that marks the start of civil twilight. So dawn is start of morning twilight; dusk is the end of evening twilight. Common usage makes dusk and dawn intervals.
Flag List[edit]
In the 1700s, the Royal Navy advancement was by date of rank. A book was published periodically that had the flag officer list and the captains list. Ultimately, a query should be able to produce that list as a function of date.
- https://catalog.hathitrust.org/Record/002135197
- https://babel.hathitrust.org/cgi/pt?id=mdp.39015062989952&view=1up&seq=12
- https://catalog.hathitrust.org/Record/012313436 (several lists)
- See https://en.wikipedia.org/wiki/Navy_Directory
- https://catalog.hathitrust.org/Record/000540861 (Navy Lists)
Post Captains[edit]
Calendar[edit]
The calendar switch may be an issue. The Gregorian calendar switch was in October 1582 (+11 days), but it was not adopted by all countries. Scotland switched in 1600, England switched in September 1752, and Russia in January 1918.
For example, George Washington was born 11 February 1731 Julian, but that is 22 February 1731 Gregorian.
That may have an impact on the flag list. If the date is after 1752, then it is clearly Gregorian. If the date is before the switch, then was the date left as Julian or was it corrected?
Titles[edit]
The flag list uses titles.
- Name
- nothing special
- Sir William Sidney Smith, Knight
- Sir Richard John Strachan, Bart
- Sir Name, Bart and Knight of the Bath
- so Sir used for knights and baronets
- Hon. Name
- Honourable used for children of viscounts and barons and younger children of earls.
- Rt. Hon. Name
- Right Honourable used for earls, viscounts, and barons
- Rt. Hon. Lord Augustus FitzRoy, Lord Augustus FitzRoy (Q4297162), noble title (P97) → Lord, father (P22) → Charles FitzRoy, 2nd Duke of Grafton = Charles FitzRoy, 2nd Duke of Grafton (Q1071465)
- Rt. Hon. George Lord Viscount Garlies
- Rt. Hon. William Earl of Northesk, Earl of Northesk (Q1277373)
- Rt. Hon. James Lord Cranstoun, James Cranstoun, 8th Lord Cranstoun (Q6131887), Lord Cranstoun (Q6679131), noble title (P97) → , father (P22) → James Cranstoun, 6th Lord Cranstoun
- Name, Prince of Bouillon
Hierarchy (guess) See en:Landed gentry, en:Social class in the United Kingdom, en:Peerage, en:Nobility, en:Royal family
- knight (Q102083) knight
- baronet (Q282019) (British) baronet (heredity non-peer); short name (P1813) Bt, Bart
- baron (Q165503) baron
- viscount (Q185902) viscount
- earl (Q1128240) earl
- marquess (Q209726) marquess
- duke (Q166886) (European countries) duke
- royalty
Properties
Promotion[edit]
This reference describes strict promotion, what the admiralty did with infirm captains, and the "yellow" squadron. In 1747, a captain could be promoted to "Rear-Admiral without distinction of squadron".
- https://www.napoleon-series.org/military-info/organization/Britain/Navy/c_flagranks.html Promotion in the Flag Ranks in the Royal Navy during the Napoleonic Wars. Stephen Millar.
Significantly, it describes distribution at particular times.
In 1769,
- honorary Vice Admiral of Great Britain, Admiral of the Fleet Edward Hawke, 1st Baron Hawke (1705-1781), appointed 1765
- (1) Admiral of the Fleet: Edward Hawke, 1st Baron Hawke (1705-1781) 15 January 1768
- (7) Admirals
- (3) of the White
- (4) of the Blue
- (10) Vice Admirals
- (3) of the Red
- (3) of the White
- (4) of the Blue
- (11) Rear Admirals
- (4) of the Red
- (4) of the White
- (5) of the Blue
- (22) Superannuated Rear Admirals (were these never advanced through the squadrons?)
In 1812 (see also https://babel.hathitrust.org/cgi/pt?id=nyp.33433008433462&view=1up&seq=12),
- First Lord of the Admiralty, Charles Philip Yorke (1764-1834) and Robert Dundas, 2nd Viscount Melville (1771-1851)
- (1) Admiral of the Fleet: HRH the Duke of Clarence (1765-1837), appointed 1811
- (61) Admirals
- (21) of the Red (created in 1805)
- (20) of the White
- (20) of the Blue
- (65) Vice Admirals
- (22) of the Red
- (19) of the White
- (24) of the Blue
- (64) Rear Admirals
- (19) of the Red
- (17) of the White
- (24) of the Blue
- (31) Superannuated Rear Admirals
[edit]
A rank specific to the Royal Navy implies a military branch.
# rank implies branch
SELECT DISTINCT ?person ?personLabel ?rankLabel
{
# military rank -- should have a start time
# admiral of the fleet wd:Q842486 .
# admiral of the fleet (Royal Navy) wd:Q2501631
# admiral
# admiral (Royal Navy) wd:Q2916006
# vice admiral wd:Q214443 .
# vice admiral (Royal Navy) wd:Q4902790
# rear admiral wd:Q156945
# rear admiral (Royal Navy) wd:Q15615347
# captain
# captain (Royal Navy) wd:Q5036514
# flag officer (watch out: rear admiral is an instance of military rank) wd:Q977459 .
# select a Royal Navy rank
BIND (wd:Q2916006 AS ?rank) .
# person has that rank
?person wdt:P410 ?rank .
# human instead of fictional
?person wdt:P31 wd:Q5 .
# person in Royal Navy
FILTER not exists {?person wdt:P241 wd:Q172771 .}.
# occupation is naval officer
# FILTER not exists {?person wdt:P106 wd:Q10669499 .}.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?timeAdmiral
Find a person[edit]
# Find a person
SELECT ?person ?personLabel ?timeCaptain ?timeDeath ?threeID WHERE {
BIND("1800-12-01"^^xsd:dateTime AS ?dateDeath) .
?person wdt:P31 wd:Q5 .
# ?person wdt:P570 ?dateDeath .
# Three Decks person ID
?person wdt:P7389 ?threeID .
# ?person wdt:P410 ?rank .
optional {
?person wdt:P570 ?timeDeath .
} .
optional {
?person p:P410 ?stmtCaptain .
?stmtCaptain ps:P410 wd:Q5036514 .
?stmtCaptain pq:P580 ?timeCaptain .
} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY ?timeDeath
Three Decks list[edit]
# Three Decks list for the Royal Navy
SELECT DISTINCT ?person ?personLabel ?threeID
{
# person in Royal Navy
?person wdt:P241 wd:Q172771 .
# human instead of fictional
?person wdt:P31 wd:Q5 .
?person wdt:P7389 ?threeID .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?threeID
List of Admirals[edit]
en:List of Royal Navy admirals (1707–current) (which would not include vice admirals such as Nelson).
# Admiral list for the Royal Navy
SELECT DISTINCT ?timeAdmiral ?person ?personLabel ?timeBirth ?timeDeath ?fleet ?threeID
{
# allow the report to work for different years
BIND ("1707-01-01"^^xsd:dateTime AS ?timeReport) .
# person in Royal Navy
?person wdt:P241 wd:Q172771 .
# human instead of fictional
?person wdt:P31 wd:Q5 .
# ?person wdt:P410 ?rank .
# ?rank wdt:P279 wd:Q977459 .
# admiral of the fleet (of the Royal Navy) subclass of admiral of the fleet Q842486
# ?person wdt:P410 wd:Q2501631 .
# use P279 to pick up the subclass
# military rank -- should have a start time
# admiral of the fleet wd:Q842486 .
# admiral of the fleet (Royal Navy) wd:Q2501631
# admiral
# admiral (Royal Navy) wd:Q2916006
# get statements about the person's rank
optional {
?person p:P410 ?stmtFleet .
?stmtFleet ps:P410 wd:Q2501631 .
BIND(1 AS ?fleet) .
}
?person p:P410 ?stmtAdmiral .
?stmtAdmiral ps:P410 wd:Q2916006 .
optional {
?stmtAdmiral pq:P580 ?timeAdmiral .
}
optional {
?person wdt:P7389 ?threeID .
} .
# get time of death (some have multiple death dates)
?person wdt:P570 ?timeDeath .
?person wdt:P569 ?timeBirth .
filter ( ?timeReport < ?timeDeath) .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?timeDeath
January 1790 List[edit]
Nelson was 169th on the Captains List.
List has 49 Admirals. Query gets 50. Ah, the book miscounts by calling # 26 just # 25; there are 50 Admirals.
John Laforey (Q6243805) Laforey got special dispensation to be # 40. How should that be handled? Captain's date sorts. Promoted out of the yellow?
January 1791 List[edit]
List has 56 entries. Query gets 56.
Done From 1790 list, need to add
- 48.
Thomas Fitzherbert (1727-1794) Thomas Fitzherbert (Q125628408), 21 Sept 1790, 10 Jul 1761.https://threedecks.org/index.php?display_type=show_crewman&id=1625 - 51.
John Houlton (c.1728-1791) John Houlton (Q125628535), 21 Sept 1790, 5 Nov 1761.https://threedecks.org/index.php?display_type=show_crewman&id=9032 - 53.
Charles Inglis Charles Inglis (Q11318320), 21 Sept 1790, 15 Dec 1761 - 54.
Samuel Granston Goodall Samuel Goodall (Q7411504), 12 Sept 1790, 13 Jan 1762 - 55.
Keith Stewart Keith Stewart (Q6385074), 21 Sept 1790, 7 Apr 1762
January 1792 List[edit]
Nelson was 140th on the Captains List.
Done There are 54 entries on 1792 list. Query gets 54.
August 1795 List[edit]
Nelson is 7th on the captains' list.
Done Query produces 106 entries. List has 106 entries.
- 3.
John Montagu John Montagu (Q16844103) (refined death date to 7 Sept 1795) - 7.
Mathew Barton Matthew Barton (Q6790134) (refined death date to 30 Dec 1795) - 41.
Sir George Bowyer Sir George Bowyer, 5th Baronet (Q7526841) - 46.
John Macbride John MacBride (Q4275192) - 47.
George Vandeput George Vandeput (Q5545454) - 52.
John Lewis Gidoin John Lewis Gidoin (Q107171585) - 53.
George Gayton George Gayton (Q107171683) - 54.
George Murray George Murray (Q5542714)// not George Murray (Q5542713) // - 59.
John Symons John Symons (Q107171525) - 61.
Charles Thompson Sir Charles Thompson, 1st Baronet (Q7526302) - 63.
John Ford John Ford (Q21209224) - 98.
Hugh Cloberry Christian Hugh Cloberry Christian (Q5930375) - 99.
William Truscott William Truscott (Q107171773) - 100.
Lord Hugh Seymour Hugh Seymour (Q6679399) - 101.
John Stanhope John Stanhope (Q75565783)
January 1798 List[edit]
Nelson is RA of the Blue at 101.
Done Flag list has 104 entries. Query now gives 104.
Gidoin and Gayton are not on the 1798 list. Need to find two more:
98 William Fooks William Fooks (Q107171899)102 Thomas Lenox Frederick Thomas Lenox Frederick (Q7789804)
January 1799 list[edit]
Nelson is RA of the Blue at 96.
Done Flag list has 99 entries. Query has 98 entries.
Make the query use 1 November 1798 and it works.
So missing one entry? Checking whole list...
46. Symons48. Thompson- 84. Hugh Cloberry Christian (-23 November 1798) so should not be on the list!
86. Stanhope97. Frederick
January 1802 List[edit]
The vice admirals end at 83 (last is Nelson). The rear admirals end at 138 (last is Sir James Saumarez 1 January 1801). Query gives 120; missing 18.
July 1803 List[edit]
- 125 James Saumarez
So there are no new additions, but 13 died. My list went from (120+18) to (109+18-2).
July 1804 List[edit]
Nelson is VAW at 70.
- 121 James Saumarez (so 4 previous admirals in the flag list died).
My list is 104 long but includes new admirals #125 and #139. Therefore Saumarez would be 102 on my list, so I'm missing 19 earlier admirals
With new additions it would be 104+37 = 141. That is only missing 9 earlier admirals. So of the missing 18 1802 additions, only 9 are left?
Flag list is 150 long.
Need to add (39-2):
- 122 Thomas Drury Thomas Drury (Q104530195)
- 123 Albemare Bertie Sir Albemarle Bertie, 1st Baronet (Q2637363)
- 124 Rt Hon William Earl of Northesk William Carnegie, 7th Earl of Northesk (Q153513)
- 125
James Vashon James Vashon (Q74098) - 126 William Henry Douglas Sir William Henry Douglas, 2nd Baronet (Q76275409)
- 127 Thomas Wells Thomas Wells (Q75637739)
- 128
Edward Pellew Edward Pellew, 1st Viscount Exmouth (Q335338) - 129 Isaac Coffin Sir Isaac Coffin, 1st Baronet (Q7527341)
- 130 John Aylmer
- 131 Samuel Osborn
- 132 Richard Boger
- 133 Jonathan Faulknor
- 134 John Child Purvis John Child Purvis (Q41752069)
- 135 Theophilus Jones Theophilus Jones (Q17423499)
- 136 William Domett William Domett (Q8007884)
- 137 William Wolseley William Wolseley (Q18593644)
- 138 John Manley
- 139
George Murray George Murray (Q5542713) - 140 John Sutton
- 141 Robert Murray
- 142 Alexander Cochrane Alexander Cochrane (Q714600)
- 143 Thomas Troubridge Sir Thomas Troubridge, 1st Baronet (Q3525621)
- 144 John Markham John Markham (Q6246771)
- 145 Henry D'Esterre Darby Henry D'Esterre Darby (Q5720076)
- 146 Edward Bowater
- 147 George Palmer
- 148 William O'Bryen Drury William O'Bryen Drury (Q8016227) AND William O'Bryen Drury (Q97184300)
- 149 William Effington
- 150 Thomas Louis Thomas Louis (Q7791933)
January 1807 List[edit]
January 1809 List[edit]
January 1812 List[edit]
Find more years: https://catalog.hathitrust.org/Record/012313436
January 1831 List[edit]
https://babel.hathitrust.org/cgi/pt?id=mdp.39015073474838&view=1up&seq=9
More Stuff[edit]
There is the Blue-White-Red mess:
- Rear-Admiral of the Blue (Q24038804) ra/blue followed by (P156)
- Rear-Admiral of the White (Q24038806) ra/white followed by (P156)
- Rear-Admiral of the Red (Q24038805) ra/red followed by (P156)
- Vice-Admiral of the Blue (Q24038807) va/blue followed by (P156)
- Vice-Admiral of the White (Q24038809) va/white followed by (P156)
- Vice-Admiral of the Red (Q24038808) va/red followed by (P156)
- Admiral of the Blue (Q24038800) a/blue followed by (P156)
- Admiral of the White (Q24038802) a/white followed by (P156)
- Admiral of the Red (Q24038801) a/red followed by (P156) (conditional with time)
- Admiral of the Fleet (Q2501631)
SELECT ?person ?personLabel ?rank ?rankLabel WHERE {
BIND(wd:Q24038804 AS ?rank) .
?person wdt:P31 wd:Q5 .
?person wdt:P410 ?rank .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
Also the honorary mess Rear-Admiral of the United Kingdom (Q2995864), Vice Admiral of the United Kingdom (Q3556878), Lord High Admiral (Q16153574)
Also next lower rank (P3729) next higher rank (P3730)
There are problems with the underlying data.
- occupation (P106) naval officer (Q10669499) is a career, but
- occupation (P106) vice admiral (Q214443) is only a part of that career.
- military rank (P410) is a better notion of specifying a rank.
- The same issue exists with somebody being a career politician. During portions of that career, she may be a mayor, legislator, governor, and senator.
- Admiral of the Fleet (Q2501631) of the Royal Navy is a subclass of admiral of the fleet (Q842486). Although it is a subclass, stating generic admiral of the fleet and specifying military branch (P241) of Royal Navy (Q172771) seems the better method. The first statement implies the other two. Codd Normal Form. (Except that the British have an honorary admiral of the fleet that is handed out to princes and foreigners.)
- IIRC, one rank I found is a subclass of both admiral and general. Some ranks are equivalent, but the notion of the names being equivalent is twisted. flag officer (Q977459).
- vice admiral (Q214443) instance of (P31) naval officer rank (Q4226220) and subclass of (P279) flag officer (Q977459).
- rear admiral (Q156945) is both an instance and a class suggests there are two hierarchies. I do not like the notion of something being a instance of (P31) instance of (P31).
# improper occupations
SELECT ?p ?pLabel ?w ?wLabel WHERE {
wd:Q30 p:P6/ps:P6 ?p .
?p wdt:P26 ?w .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
SELECT ?person ?personLabel ?rankLabel WHERE
{
# BIND (wd:Q214443 AS ?rank) .
# real human
?person wdt:P31 wd:Q5 .
# has an occupation
?person wdt:P106 ?rank .
# occupation is a naval officer rank
?rank wdt:P31/wdt:P279* wd:Q4226220 .
# occupation is a military rank
# ?rank wdt:P31/wdt:P279* wd:Q56019 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
# Looking at ranks
SELECT ?rank ?rankLabel
{
# this returns just 2: Chief of Joint Operations and rear admiral
#?rank wdt:P31/wdt:P279* wd:Q977459 .
#?rank wdt:P279* wd:Q977459 .
# instance of military rank
?rank wdt:P31/wdt:P279* wd:Q56019 .
# this part of the Royal Navy
?rank wdt:P361 wd:Q172771 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?rankLabel
Flag list query[edit]
Should fix the post captain issue (a subclass of captain).
# Working on a flag list for the Royal Navy
SELECT DISTINCT ?person ?personLabel ?fleet ?timeAdmiral ?timeVice ?timeRear ?timeCaptain ?threeID
{
# allow the report to work for different years
BIND ("1802-01-01"^^xsd:dateTime AS ?timeReport) .
# person in Royal Navy
?person wdt:P241 wd:Q172771 .
# human instead of fictional
?person wdt:P31 wd:Q5 .
# ?person wdt:P410 ?rank .
# ?rank wdt:P279 wd:Q977459 .
# admiral of the fleet (of the Royal Navy) subclass of admiral of the fleet Q842486
# ?person wdt:P410 wd:Q2501631 .
# use P279 to pick up the subclass
# military rank -- should have a start time
# admiral of the fleet wd:Q842486 .
# admiral of the fleet (Royal Navy) wd:Q2501631
# admiral
# admiral (Royal Navy) wd:Q2916006
# vice admiral wd:Q214443 .
# vice admiral (Royal Navy) wd:Q4902790
# rear admiral wd:Q156945
# rear admiral (Royal Navy) wd:Q15615347
# captain
# captain (Royal Navy) wd:Q5036514
# flag officer (watch out: rear admiral is an instance of military rank) wd:Q977459 .
# get statements about the person's rank
optional {
?person p:P410 ?stmtFleet .
?stmtFleet ps:P410 wd:Q2501631 .
BIND(1 AS ?fleet) .
}
optional {
?person p:P410 ?stmtAdmiral .
?stmtAdmiral ps:P410 wd:Q2916006 .
?stmtAdmiral pq:P580 ?timeAdmiral .
} .
optional {
?person p:P410 ?stmtVice .
?stmtVice ps:P410 wd:Q4902790 .
?stmtVice pq:P580 ?timeVice .
} .
optional {
?person p:P410 ?stmtRear .
?stmtRear ps:P410 wd:Q15615347 .
?stmtRear pq:P580 ?timeRear .
} .
optional {
?person p:P410 ?stmtCaptain .
?stmtCaptain ps:P410 wd:Q5036514 .
?stmtCaptain pq:P580 ?timeCaptain .
} .
# Three Decks ID
optional {
?person wdt:P7389 ?threeID .
} .
# get time of death (some have multiple death dates)
?person wdt:P570 ?timeDeath .
filter ( ?timeReport <= ?timeDeath) .
filter ( ?timeReport > ?timeRear) .
# occupation naval officer
# ?person wdt:P106 wd:Q10669499
# occupation military officer
# ?person wdt:P106 wd:Q189290 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?timeRear ?timeCaptain
Participants in a battle[edit]
Consider a battle such as Battle of Cape St. Vincent (Q373401). Which ships participated?
en:Battle_of_Cape_St._Vincent_(1797) provides a list of 15 + 7 ships on the British side. Spanish fleet is broken down by squadrons.
Consider HMS Victory (Q213958)
- conflict (P607) → First Battle of Ushant, Battle of Ushant, Battle of Cape Spartel, Battle of Cape St. Vincent, Battle of Trafalgar
- conflict is used for battles...
- participant in (P1344) → Battle of Trafalgar, Battle of Cape St. Vincent
The query now gets 19 results (short of 22). Three ships are unrated.
SELECT ?ship ?shipLabel WHERE {
# ship of the line Q207452
?ship wdt:P31/wdt:P279 wd:Q207452 .
# conflict
?ship wdt:P607 wd:Q373401 .
# particpant
# ?ship wdt:P1344 wd:Q373401 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
Ships of the Line[edit]
SELECT ?ship ?shipLabel
{
# instance of ship of the line Q207452
?ship wdt:P31/wdt:P279* wd:Q207452 .
# operator GB
?ship wdt:P137 wd:Q172771 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?shipLabel
A confused hierarchy: the Ajax class is a subclass of ship of the line rather than being a subclass of n-rate.
If {A instance of B, A instance of C, B subclass C} → remove {A instance of C}.
If {A instance of C, B subclass C} → possibly {A instance of B}.
SELECT ?shipclass ?shipclassLabel
{
# first-rate Q892367 subclass of ship of the line Q207452
# second-rate Q892368
# third-rate Q892492
# fourth-rate Q892562
# fifth-rate Q892554 is subclass of frigate Q12012855
# sixth-rate Q892278 is subclass of frigate
# subclass of ship of the line Q207452
?shipclass wdt:P279 wd:Q207452 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?shipclassLabel
Languages[edit]
SELECT ?lang ?langLabel ?l1 ?l2 ?l3 ?l4
{
# instance of a language
?lang wdt:P31/wdt:P279* wd:Q34770 .
# ISO 639-1 code
optional {
?lang wdt:P218 ?l1 .
} .
# ISO 639-2 code
optional {
?lang wdt:P219 ?l2 .
} .
# ISO 639-3 code
optional {
?lang wdt:P220 ?l3 .
} .
# IETF language tag
optional {
?lang wdt:P305 ?l4 .
} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?langLabel
Submarines[edit]
- https://babel.hathitrust.org/cgi/pt?id=uc1.31822019649607&view=1up&seq=1
- 440 ships sunk in April 1917
- 178 U-boats sunk during WW I.
Submarines do not have patrol plots, attacks, sinkings.
Conlicts: WW II is a war, Pacific War is a theatue.
US submarines in WW II[edit]
SELECT ?sub ?subLabel
{
# instance of submarine
?sub wdt:P31/wdt:P279* wd:Q2811 .
# conflict is Pacific War
#?sub wdt:P607 wd:Q184425 .
# conflict is WW II
?sub wdt:P607 wd:Q362 .
# operator is US Navy
?sub wdt:P137 wd:Q11220 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?subLabel
German submarines in WW II[edit]
Battle of the Atlantic statistics in war reports and post war surveys. Stats such as number of patrols, merchants sunk, and submarines sunk.
Group by month. Count
SELECT ?sub ?subLabel ?timeSink ?timeScuttle
{
# instance of submarine
?sub wdt:P31/wdt:P279* wd:Q2811 .
# ?sub wdt:P607 wd:Q184425 .
# conflict is WW II
?sub wdt:P607 wd:Q362 .
# operator is Kriegsmarine
?sub wdt:P137 wd:Q151701 .
optional {
# significant event is sinking
# ?sub wdt:P793 wd:Q30880545 .
?sub p:P793 ?stmtSignificant .
?stmtSignificant ps:P793 wd:Q30880545 .
?stmtSignificant pq:P585 ?timeSink .
}
optional {
# significant event is scuttling
# ?sub wdt:P793 wd:Q1786766 .
?sub p:P793 ?stmtSignificant .
?stmtSignificant ps:P793 wd:Q1786766 .
?stmtSignificant pq:P585 ?timeScuttle .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?timeSink
Second Happy Time[edit]
See en:https://en.wikipedia.org/wiki/Second_Happy_Time. It has a list of ships lost and submarines lost.
See also https://www.youtube.com/watch?v=gp5diNUq-rU&t=1m37s at 1:37
Japanese warships[edit]
Goal: a query that lists all IJN vessels torpedoed by a submarine during WW II.
- Japanese aircraft carrier Shōkaku (Q849588) instance of aircraft carrier
- conflict: World War II
No mention of sinking by USS Cavalla (Q1398898)
- Japanese aircraft carrier Shinano (Q241858) instance of aircraft carrier
- shipwrecking
- detail is torpedo attack but no more details.
- shipwrecking
en:List of sunken aircraft carriers
World War I fighter pilots[edit]
The query has several holes. The military branch may not be specified or it may be too generic. Or it may be wrong. follows (P155), followed by (P156), replaces (P1365), replaced by (P1366)
- United States Army (Q9212)
- Aviation Section, U.S. Signal Corps (Q3510406) dissolved 20 May 1918
- Air Service, United States Army (Q2096700) started 24 May 1918 to 1926
- United States Army Air Corps (Q2140008) from 1926 to 1947
- United States Army Air Forces (Q741723) from 1941 to 1947
Same with
- Imperial German Air Service (Q678503) 1913 to 1918
- Luftwaffe (Q2564009) started 1935
Pilots
SELECT ?pilot ?pilotLabel ?branch ?branchLabel ?awardLabel
{
# instance of human
?pilot wdt:P31 wd:Q5 .
# occupation is fighter pilot
?pilot wdt:P106 wd:Q618694 .
OPTIONAL {
# military branch
?pilot wdt:P241 ?branch .
}
# conflict is WW I
?pilot wdt:P607 wd:Q361 .
OPTIONAL {
# award
?pilot wdt:P166 ?award .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?pilotLabel
Cast member in two films[edit]
Find the common cast members in two films.
# Find a person
SELECT ?person ?personLabel ?film1Label ?film2Label WHERE {
# Auntie Mame
BIND(wd:Q1219582 AS ?film1) .
# The Big Sleep
BIND(wd:Q221462 AS ?film2) .
# cast member
?film1 wdt:P161 ?person .
?film2 wdt:P161 ?person .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
Golf tournament winners[edit]
Even better: duplicated table at en:List of men's major championships winning golfers.
SELECT ?person ?personLabel (COUNT(?tournament) AS ?count) WHERE {
# tournament is a men's major
# e.g., 2019 Masters Tournament Q55316366 is P31 of Masters Tournament Q280275
# P279 of golf tournament Q15061650 (argh! inappropriate subclass)
# P279 of men's major golf championships Q268554
# P279 of golf tournament Q15061650
?tournament wdt:P31/wdt:P279* wd:Q268554 .
# just a golf tournament
# ?tournament wdt:P31/wdt:P279* wd:Q15061650 .
# the winner of the tournament
?tournament wdt:P1346 ?person .
# person is human
# ?person wdt:P31 wd:Q5 .
# occupation is a golfer (not required for an Open winner)
# ?person wdt:P106 wd:Q11303721 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
GROUP BY ?person ?personLabel
ORDER BY DESC(?count)
Subclass issue[edit]
The U.S. Open is an open golf tournament which is a subclass of golf tournament. It makes sense to be both a major and an open golf tournament: major does not → open golf tournament. It does not make sense for a major and a golf tournament: major → golf tournament.
SELECT ?tournament ?tournamentLabel WHERE {
# tournament is a men's major
# e.g., 2019 Masters Tournament Q55316366 is P31 of Masters Tournament Q280275
# P279 of golf tournament Q15061650 (argh! inappropriate subclass)
# P279 of men's major golf championships Q268554
# P279 of golf tournament Q15061650
?tournament wdt:P279 wd:Q268554 .
# just a golf tournament
?tournament wdt:P279+ wd:Q15061650 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} ORDER BY ?tournamentLabel
Refrigerants[edit]
See List of refrigerants and https://www.ashrae.org/technical-resources/standards-and-guidelines/ashrae-refrigerant-designations
SELECT ?ref ?refLabel ?form ?smiles ?melt ?boil ?ashrae ?cas WHERE {
?ref wdt:P31 wd:Q266790 .
optional {
?ref wdt:P274 ?form .
}
optional {
?ref wdt:P233 ?smiles .
}
optional {
?ref wdt:P2101 ?melt .
}
optional {
?ref wdt:P2102 ?boil .
}
optional {
?ref wdt:P4842 ?ashrae .
}
optional {
?ref wdt:P231 ?cas .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?refLabel
City by population in a state[edit]
SELECT ?city ?cityLabel ?countyLabel ?pop WHERE {
# a city in the US
?city wdt:P31/wdt:P279 wd:Q1093829 .
# expect next administrative territory is a county
?city wdt:P131 ?county .
# in a particular state
?county wdt:P131 wd:Q1384 .
# get the population
?city wdt:P1082 ?pop .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY DESC(?pop) LIMIT 1000
Stars[edit]
Too many stars in the sky.... Create navigational star (Q108171565) so the relevant subset can be selected quickly. The 1981 Nautical Almanac states:
Typically, only 57 stars are used for navigational purposes in both Northern and Southern Hemispheres. Here you’ll also find Polaris and Scheat. In the Northern Hemisphere Polaris is often used for determination of latitude.
SELECT ?star ?starLabel ?epochLabel ?ra ?decl WHERE {
?star wdt:P31 wd:Q108171565 .
?star wdt:P6259 ?epoch .
?star wdt:P6257 ?ra .
?star wdt:P6258 ?decl .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} LIMIT 100
Epoch[edit]
See
Some of these are inappropriate.
SELECT ?epoch ?epochLabel WHERE {
?epoch wdt:P31 wd:Q2703 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?epochLabel
Constellations[edit]
Can find the constellations without hitting a time limit.
https://www.iau.org/public/themes/constellations/
Boundaries of the constellations (B1875): http://pbarbier.com/constellations/boundaries.html#:~:text=Original%20boundary%20data%20The%20original%20constellation%20boundary%20data,a%20sequence%20of%20vertices%2C%20one%20vertex%20per%20line
SELECT ?constellation ?constellationLabel WHERE {
# there are 88 constellations
# this returns 462 results
# there are Chinese constellations
# Pisces instance of constellation and zodiacal constellation
# ?constellation wdt:P31/wdt:P279* wd:Q8928 .
# try simpler
# this has 89 results
# there are two Musca constellations: wd:Q10435 wd:Q6940204
# soms has part...
# for Orion, a part is the asterism Orion's belt, which has parts
?constellation wdt:P31 wd:Q8928 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?constellationLabel
Museum paintings[edit]
SELECT ?painting ?paintingLabel ?creatorLabel ?locationLabel WHERE {
# BIND(wd:Q762 AS ?creator).
#Louvre
#BIND(wd:Q19675 AS ?location).
#Musee d'Orsay
BIND(wd:Q23402 AS ?location).
# a painting
?painting wdt:P31/wdt:P279* wd:Q3305213 .
# painted by ...
?painting wdt:P170 ?creator .
# located in the Louvre
?painting wdt:P276 ?location .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?creatorLabel # LIMIT 2000
GIS[edit]
Look at spatial reference system (Q161779); especially has-parts.
For example, World Geodetic System 1984 (Q11902211) and EPSG CRS (P1338).
geodetic reference system (Q1502887) is both an instance and a subclass of frame of reference (Q184876). spatial reference system (Q161779) is only an instance of frame of reference (Q184876); it is a subclass of coordinate system (Q11210).
Handling semi-major axis (Q171594) and inverse flattening (Q65952201) as has-parts seems strained, but maybe it is right. If an instance, then it should have the properties. If a subclass, then each instance should have the property, and the property should be restricted to a specific value. A better way would be to point to a specific ellipsoid; something like the class X is based on this item. Ah, the problem is they are not properties but rather items!
SELECT ?CRS ?CRSLabel WHERE {
# a CRS
# confusion about
# version of Q1502887
# instance of spatial reference system Q161779
# subclass of Q1502887
?CRS wdt:P31/wdt:P279* wd:Q161779 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
}
SELECT ?CRS ?CRSLabel ?id WHERE {
# a CRS that has an EPSG CRS id
?CRS wdt:P1338 ?id .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
}
There is reference ellipsoid (Q1335878) (and the general Earth ellipsoid (Q1203807)).
Look for reference ellipsoids; no EPSG.
SELECT ?RE ?RELabel WHERE {
# a Reference Ellipsoid
?RE wdt:P31/wdt:P279* wd:Q1335878 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
}
France[edit]
Looking at regimes and Constitutions of France for File:Chronologie constitutions françaises.svg.
I am not getting some regimes
- National Constitutent Assembly, National Constituent Assembly (Q876424)
- not a regime
- country Kingdom of France (Q70972)
- has inception
- no abolish
- Legislative Assembly, Legislative Assembly (Q780457) (replaced by National Convention!)
- not a regime
- no country
- uses start time and end time
- Directory, French Directory (Q219817)
- has country French First Republic (Q58296) !
- has inception
- has abolished
- French Third Republic, French Third Republic (Q70802)
- republic regime in France (Q17152708) is a subclass of regime; has dates; should work
- country is France; should work
- has inception P571; should work
- has abolished P576
- historical country is preferred over republic regime of France; lower to normal rank and try again. That worked!
- Hundred Days, Hundred Days (Q199955) (after First Restoration)
- instance of regime
- no country!
- start and end times instead of inception!
- Second Republic, French Second Republic (Q58326) (after July Monarchy)
- subclass! instead of instance of republic regime in France. Fixed.
- has country
- has inception and abolished
- Government of National Defense, Government of National Defense (Q2358315) (after Second Empire)
- instance of Government rather than regime. Added republic regime in France.
- has country
- has start and end times rather than inception. Add inception. Start time same as Third Republic!
SELECT ?regime ?regimeLabel ?date ?fini ?pred ?predLabel ?succ ?succLabel
{
# instance of a regime
# republic regime in France (Q17152708) might be better but few use it
# some also use provisional government that is a subclass of regime
?regime wdt:P31/wdt:P279* wd:Q5589178 .
# country is France
# country is not quite right. some regimes do not use France
?regime wdt:P17 wd:Q142 .
# date of inception
# some use start date
?regime wdt:P571 ?date .
optional {
# abolished
# some use end date
?regime wdt:P576 ?fini .
# these are very confused because they address different territories
# ?regime wdt:P155 ?pred .
# ?regime wdt:P156 ?succ .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?date
Fonts[edit]
Where was the original query? There were a lot of issues with semantics.
compare
- font (Q4868296) font whose description is "particular size, weight and style of a typeface".
see
- PostScript core fonts level 2 (Q55078030) PostScript core fonts level 2
- Standard Music Font Layout (Q106776681) Standard Music Font Layout
Font classification
- typeface (Q17451) Typeface
- serif typeface (Q58480509) serif typeface
- sans-serif (Q864011) sans-serif typeface
- dingbat typeface (Q47167051) dingbat typeface
- Unicode typeface (Q4526631) Unicode typeface
Instances of a typeface
- Times New Roman (Q213048) Times New Roman
- Symbol (Q187829) Symbol typeface
- Noto Music (Q75905102) Noto Music
- Noto Sans (Q74538912) Noto Sans
- Noto Sans Siddham (Q75925623) Noto Sans Siddham
- Palatino (Q1093499) Palatino
Publishers
- Monotype (Q1583606) Monotype
- Microsoft (Q2283) Microsoft
- Mergenthaler Linotype Company (Q2075244) Mergenthaler Linotype
- International Typeface Corporation (Q1504199) International Typeface Corporation
Adobe (Q11463) Adobe
Type Foundry type foundry (P4586)
- Adobe Type (Q145253) Adobe Type (part of Adobe)
Google Font ID Google Fonts ID (P10687)
SELECT ?font ?fontLabel ?publisher ?publisherLabel
{
# instance of a type face (aka font family?)
?font wdt:P31/wdt:P279* wd:Q17451 .
optional {
?font wdt:P123 ?publisher .
}
optional {
?font wdt:P4586 ?foundry .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?fontLabel
Knights Templar[edit]
SELECT ?gm ?gmLabel ?dateDeath
{
# instance of a human
?gm wdt:P31 wd:Q5 .
# gm holds the office of Grandmaster of the Knights Templar
?gm wdt:P39 wd:Q22673588 .
optional {
?gm wdt:P570 ?dateDeath .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?dateDeath
Optical glass[edit]
SELECT ?glass ?glassLabel
{
# an optical glass
?glass wdt:P279 wd:Q13326 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
}
Finland[edit]
See File:Regions of Finland labelled FI.svg.
Accessing native label (P1705) for fi gets the preferred label.
SELECT ?reg ?regLabel ?cap ?capLabel WHERE {
# region of Finland
?reg wdt:P31 wd:Q193512 .
# find the capital
?reg wdt:P36 ?cap .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fi" .} .
} ORDER BY ?regLabel
Map projections[edit]
Wikidata is confused. The Mercator projection (Mercator projection (Q309372)) is a instance of (P31) of:
- map projection (map projection (Q186386)),
- cylindrical projection (cylindrical projection (Q2077983)), and
- conformal projection (conformal map projection (Q1522071)).
(On 1 July 2020, the instance of map projection was dropped, so the item is just a subclass of the others.)
A cylindrical projection is both an instance of and a subclass of map projection. (The cylindrical projection was also fixed on 1 July 2020.)
Is that trying to say there is a trivial cylindrical projection, and there are other, more complicated, projections? But then there should be two items: one for the instance and one for the class.
We are back to the typeface problem.
Using subclass of (subclass of (P279)) makes more sense. I have trouble with a system that leads to an instance of an instance. A map might use an instance of a Mercator projection which is itself an instance of a map projection. If I want to make a list of different map projections, then a query that asks for all instances* of a map projection would return the instance that map used. That is not the answer I want. If Mercator projection were a subclass of map projection, then I'd ask for all subclasses* of map projection. I should get the Mercator projection without specific instances of the Mercator projection.
SELECT ?item ?itemLabel
{
# instance of a map projection
?item wdt:P31/wdt:P279* wd:Q186386 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .}
} ORDER BY ?itemLabel
SELECT ?item ?itemLabel
{
# subclass of a map projection
?item wdt:P279+ wd:Q186386 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .}
} ORDER BY ?itemLabel
Instance versus subclass[edit]
One could also say that a Lambert conformal conic projection with specific parameters is an instance of the projection.
What about a projection with no parameters. Is that an instance, a subclass, or both? Maybe the simple answer is there could only be one of them (a singleton class), so it is better to call it an instance.
Is there some better way to identify an instance?
Poking around the instance or subclass issue brought up a similar subset or set or superset issue. I do not think that Wikidata distinguishes subset and subclass.
Consider items that are an instance of and a subclass of the same item.
Wikidata apparently does not include EPSG identifiers.
Query to find suspect relations[edit]
Queries to find suspect relations.
If ?x is an instance of ?y and ?x is an instance of ?z and ?y is a subclass of ?z
Then ?x is an instance of ?z is suspect. Or rather why not find it with ?x P31/P279* ?z
Try again.
If ?x is an instance of ?y and ?x is an instance of ?z and ?y is an instance of ?z
Then ?y might be a subclass of ?z.
Also
if ?x is an instance of ?y and ?x is a subclass of ?y
Then the instance of statement is suspect.
Actors and their films[edit]
Actors (cast member (P161)) and great movies (film (Q11424), review score (P444)).
- Clark Gable (Q71243)
- Humphrey Bogart (Q16390)
- Cary Grant (Q83410)
- John Wayne (Q40531)
- William Holden (Q95002)
- Harrison Ford (Q81328)
- Alec Guinness (Q103894)
- Steve McQueen (Q159347)
- Jack Nicholson (Q39792)
- Peter O'Toole (Q103876)
- George Clooney (Q23844)
- Morgan Freeman (Q48337)
- Clint Eastwood (Q43203)
- Jack Lemmon (Q94123)
- Bette Davis (Q71206)
- Katharine Hepburn (Q56016)
- Audrey Hepburn (Q42786)
- Greta Garbo (Q5443)
- Honeysuckle Weeks (Q440206)
- Peter Falk (Q484881)
- Fred Astaire (Q100937)
- Ginger Rogers (Q95089)
SELECT ?actor ?actorLabel ?rankLabel ?film ?filmLabel ?score ?stmtScore
{
# bind the actor
BIND (wd:Q16390 AS ?actor) .
# there is a film
?film wdt:P31/wdt:P279* wd:Q11424 .
# film has actor as a cast member
?film wdt:P161 ?actor .
# get the film review score statement
?film p:P444 ?stmtScore .
?stmtScore ps:P444 ?score .
# by Rotten Tomatoes
?stmtScore pq:P447 wd:Q105584 .
# determination method is tomato meter
?stmtScore pq:P459 wd:Q108403393 .
# human instead of fictional
?actor wdt:P31 wd:Q5 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?score
Directors[edit]
- John Huston (Q51575)
- Steven Spielberg (Q8877)
- Alan Smithee (Q734916) (Comment out
?director wdt:P31 wd:Q5 .
)
SELECT ?director ?directorLabel ?film ?filmLabel ?date
{
# bind the director
BIND (wd:Q8877 AS ?director) .
# there is a film
?film wdt:P31/wdt:P279* wd:Q11424 .
?film wdt:P577 ?date .
# film has a director
?film wdt:P57 ?director .
# human instead of fictional
?director wdt:P31 wd:Q5 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?date
Composers[edit]
SELECT ?composer ?composerLabel ?film ?filmLabel ?date
{
# bind the composer
BIND (wd:Q131285 AS ?composer) .
# there is a film
?film wdt:P31/wdt:P279* wd:Q11424 .
?film wdt:P577 ?date .
# film has a composer
?film wdt:P86 ?composer .
# human instead of fictional
?composer wdt:P31 wd:Q5 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?date
TV[edit]
Who has the most appearances? television series (Q5398426)
Do a GROUP BY with a COUNT?
- The Flintstones (Q201358) (has characters by not voice artists)
- The Beverly Hillbillies (Q941737)
- Petticoat Junction (Q1248820)
Multiple awards[edit]
Looking for EGOT. .
More problems with instance and subclass...
SELECT ?actor ?actorLabel
{
# human instead of fictional
?actor wdt:P31 wd:Q5 .
# occupation is an actor
?actor wdt:P106/wdt:P279* wd:Q33999 .
# Best Actor Oscar
# best actor is an instance of Academy Awards Q19020!
?actor wdt:P166 wd:Q103916 .
# Golden Globe
?actor wdt:P166/wdt:P279* wd:Q1011547 .
# Tony Award
# best actor is an instance of Tony Awards Q191874 rather than a subclass!
# ?actor wdt:P166/wdt:P279* wd:Q191874 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?actorLabel
District Attorneys[edit]
- George Gascón (Q5539636) listed as position held (P39) San Francisco District Attorney (Q85222257)
- Gil Garcetti (Q5560519) listed as position held (P39) prosecutor (Q600751); changed to Los Angeles County District Attorney
- Hamilton Burger (Q10293636) no position held; added Los Angeles County District Attorney
district attorney (Q653368) is a subclass of prosecutor (Q600751)
- San Francisco District Attorney (Q85222257) is a subclass of district attorney
- Los Angeles County District Attorney (Q15242890) is not a subclass of DA; added subclass.
- San Diego County District Attorney (Q7413629) is an instance of DA
- Bonnie Dumanis (Q4942332) 2003-2017
- Summer Stephan (Q100165598) 2017-present
- Alameda County District Attorney (Q113181124)
Should there be a California DA class?
The office should have an associated county. See w:List of district attorneys by county.
- looks like applies to jurisdiction (P1001)
This query finds DAs in LA and Santa Clara counties.
SELECT ?attorney ?attorneyLabel ?jurisdictionLabel
{
# find someone who holds a position
?attorney wdt:P39 ?position .
# the position is a subclass of district attorney
?position wdt:P279* wd:Q653368 .
# the position has a jurisdiction
?position wdt:P1001 ?jurisdiction .
# jurisdiction is a county in California
?jurisdiction wdt:P31 wd:Q13212489 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?jurisdictionLabel
Fix a bunch of DAs..
- w:Los Angeles County District Attorney
- w:San Diego County District Attorney
- w:San Francisco District Attorney's Office
Standard Model[edit]
No clear queries.
- Standard Model (Q18338) Standard Model
- elementary particle (Q43116) elementary particle
- type of quantum particle (Q22675015) quantum particle
- quark (Q6718) quark
- subclass of elementary fermion (Q52234516) elementary fermion
- subclass of fermion (Q44363) fermion
- subclass of elementary fermion (Q52234516) elementary fermion
- lepton (Q82586) lepton subclass of fermion (Q44363) fermion
- photon (Q3198) photon
- neutrino (Q2126) neutrino
- boson (Q43101) boson
- gauge boson (Q105580) gauge boson
- instance of type of quantum particle (Q22675015) type of quantum particle
- subclass of elementary boson (Q28920814) elementary boson
- instance of type of quantum particle (Q22675015) type of quantum particle
- subclass of elementary particle (Q43116) elementary particle
- subclass of boson (Q43101) boson
- Higgs boson (Q402) Higgs boson
- subclass of scalar boson (Q2750336) scalar boson
- subclass of elementary boson (Q28920814) elementary boson
- mass = mass (P2067) → 125.26±0.21 gigaelectronvolt per speed of light squared, 124.97±0.24 gigaelectronvolt per speed of light squared, 125.11±0.11 gigaelectronvolt per speed of light squared
- charge = electric charge (P2200) → 0 elementary charge
- spin = spin quantum number (P1122) → 0
- subclass of scalar boson (Q2750336) scalar boson
- strange quark (Q6763) strange quark shows flatness rather than hierarchy
- instance of type of quantum particle (Q22675015) type of quantum particle
- subclass of quark (Q6718) quark
- subclass of elementary particle (Q43116) elementary particle
- mass = mass (P2067) → 93±11 megaelectronvolt per speed of light squared
- charge = electric charge (P2200) → -0.333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 elementary charge
- spin = spin quantum number (P1122) → 0.5
- top quark (Q6778) top quark
- instance of type of quantum particle (Q22675015) type of quantum particle
- subclass of quark (Q6718) quark
- subclass of elementary particle (Q43116) elementary particle
- mass = mass (P2067) → 172.76±0.3 gigaelectronvolt per speed of light squared
- charge = electric charge (P2200) → 0.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 elementary charge
- spin = spin quantum number (P1122) → 0.5
- electron (Q2225) electron
- instance of type of quantum particle (Q22675015) type of quantum particle
- subclass of charged lepton (Q94535579) charged lepton
- subclass of lepton (Q82586) lepton
- subclass of elementary particle (Q43116) elementary particle
- mass = mass (P2067) → 0.00054857990907±0.000000000000016 dalton
- charge = electric charge (P2200) → −1 elementary charge
- spin = spin quantum number (P1122) → 0.5
SELECT ?particle ?particleLabel
{
# find a particle
?particle wdt:P279+ wd:Q43116 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?particleLabel
Body shape[edit]
Query uninteresting; returns male and female shapes....
SELECT ?shape ?shapeLabel
{
# find a particle
?shape wdt:P279+ wd:Q1072278 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?shapeLabel
But there is
And
Pirates[edit]
- Blackbeard Blackbeard (Q213518)
SELECT ?pirate ?pirateLabel
{
# occupation a pirate
?pirate wdt:P106 wd:Q10729326 .
# a human
?pirate wdt:P31 wd:Q5 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?pirateLabel
Serial killers[edit]
- Jeffrey Dahmer Jeffrey Dahmer (Q298364)
- Zodiac Zodiac Killer (Q218148)
SELECT ?killer ?killerLabel
{
# occupation a serial killer
?killer wdt:P106 wd:Q484188 .
# a human
?killer wdt:P31 wd:Q5 .
# country of citizenship: US
?killer wdt:P27 wd:Q30 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?killerLabel
Antibiotics[edit]
- penicillin penicillin (Q12190) subclass of β-lactam antibiotic (Q306264) subclass of antibiotic (Q12187)
- penicillin G benzylpenicillin (Q258450). has role of being an antibiotic....
- cipro ciprofloxacin (Q256602)
- streptomycin streptomycin (Q192717) subclass of antituberculous drug (Q584144) subclass of antibiotic (Q12187)
Query does not have good coverage.... Class versus instance problem.
SELECT ?antibiotic ?antibioticLabel
{
# occupation a pirate
?antibiotic wdt:P31/wdt:P279* wd:Q12187 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?pirateLabel
NFL teams[edit]
There are 32 current NFL teams. See w:National_Football_League_team_captains.
Query returns 20 (gets old teams such as Brooklyn Dodgers). Buffalo Bills are missing. It has league (P118) being American Football League (Q464508) for a time and then National Football League (Q1215884) That gives better query result: 54 teams.
Solved by filtering out dissolved teams.
Asking for head coach gets only 13 items with some duplicates. Need to filter for start and end time. See Kansas City Chiefs and Andy Reid.
Why not instance of NFL Americal Football Team?
SELECT ?team ?teamLabel ?coach ?coachLabel
{
# instance of American football team
?team wdt:P31 wd:Q17156793 .
# member of National Football League
# ?team wdt:P463 wd:Q1215884 .
# league is NFL
?team wdt:P118 wd:Q1215884 .
FILTER NOT EXISTS {
# no dissolved date
?team wdt:P576 ?date .
}
optional {
# head coach
?team wdt:P286 ?coach .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?teamLabel
Animals[edit]
These items are a surprise. I expected some properties...
animal with specific gender (Q116742203)
Also groups: herd of cattle, pride of lions
bear, , , cub
- bear (Q30090244)
- cub (Q11887417) (bear, lion, wolf)
- she-bear, fur (P527; not the same...)
cat, , , kitten
cattle, bull, cow, heifer, calf
- cattle (Q830)
- calf (Q2935)
- heifer (Q9092653)
- bull, cow (P527)
deer, stag/buck, doe, fawn
- deer (Q29838690)
- stag (Q29838881)
- doe (Q29838920)
- fawn (Q29838967)
- stag, doe (P527)
dog, , , puppy
duck, drake, , duckling
lion, lion, lioness, cub
- lion (Q140)
- (P527)
- (P2670)
seal, , , pup
Musical instruments[edit]
Not what I expected.
- MIMO's classification of musical instrument (Q26836418)
- Guizzi's classification of musical instruments (Q53424891)
- Hornbostel–Sachs (Q496327)
Violin: violin (Q8355)
- instance of type of musical instrument (Q110295396)
- subclass of family of musical instruments (Q1254773)
- part of (P361) violin family (Q1365097)
- subclass of necked box lutes played with a bow (Q57050725), fretless instrument (Q3087584), bowed string instrument (Q192096)
- subclass of string instrument (Q1798603)
- subclass of chordophone (Q1051772)
- subclass of musical instrument (Q34379)
- subclass of chordophone (Q1051772)
- subclass of string instrument (Q1798603)
- subclass of necked box lutes played with a bow (Q57050725), fretless instrument (Q3087584), bowed string instrument (Q192096)
Oboe: oboe (Q8377)
- subclass of oboe family instrument (Q42889517)
- subclass of double reed instrument (Q2152657)
- subclass of reed aerophone (Q3152896)
- subclass of reed instrument (Q42896320), woodwind instrument (Q181247), wind instrument (Q173453) (which is subclass of aerophone!)
- subclass of musical instrument (Q34379)
- subclass of reed instrument (Q42896320), woodwind instrument (Q181247), wind instrument (Q173453) (which is subclass of aerophone!)
- subclass of reed aerophone (Q3152896)
- subclass of double reed instrument (Q2152657)