Wikidata:WikiProject Sailing/Items
Types of Boat & Parts
editSailboats
editQueries
editImages of sailboats |
---|
#ImageGrid of all sailboats (Q1075310)
#boat = wikidata item id (qid)
#boatLabel = wikidata item name
#home_portLabel (optional) = home port name
#boat_name (optional) = boat name
#image (optional) = picture
#defaultView:ImageGrid
SELECT DISTINCT ?boat ?boatLabel ?boat_name ?instance_ofLabel ?home_portLabel ?image WHERE {
?boat wdt:P31/wdt:P279* wd:Q1075310; #'?boat' are 'instance of'(P31) and any number of 'subclass of' (P279*) of 'sailboat'(Q1075310)
wdt:P31 ?instance_of. #'?boat' 'instance of' (P31) are '?instance_of'
OPTIONAL { ?boat wdt:P18 ?image . }
#'?boat' 'home port' (P504) are '?home_port'
OPTIONAL {
?boat wdt:P504 ?home_port .
#filter out home ports that are no longer current (home port (P504) with an 'end time' qualifier (P582))
?boat p:P504 ?statement1 .
?statement1 ps:P504 ?home_port .
FILTER NOT EXISTS { ?statement1 pq:P582 ?x }
?home_port wdt:P625 ?home_port_coord. #'?home_port' 'coordinate location' (P625) are '?home_port_coord'
}
#'?boat" 'short name' (P1813) are '?boat_name'
OPTIONAL {
?boat wdt:P1813 ?boat_name.
#filter out names that are no longer current (short name (P1813) with an 'end time' qualifier (P582))
?boat p:P1813 ?statement2 .
?statement2 ps:P1813 ?boat_name .
FILTER NOT EXISTS { ?statement2 pq:P582 ?x }
}
#xxxLabel is the label for any variable called xxx
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
|
Map of sailboats' home ports |
---|
Based on the SPARQL query example Map and list of municipalities in The Netherlands Replace Q1075310 by a boat class to get a map of that boat class.
#Map of all sailboat (Q1075310) home ports (P504)
#boat = wikidata item id (qid)
#home_portLabel = home port name
#home_port_coord = home port coordinates
#boatLabel = wikidata item name
#boat_name (optional) = boat name
#image (optional) = picture
#defaultView:Map
SELECT DISTINCT ?boat ?boatLabel ?boat_name ?instance_ofLabel ?home_portLabel ?image ?home_port_coord WHERE {
?boat wdt:P31/wdt:P279* wd:Q1075310; #'?boat' are 'instance of'(P31) and any number of 'subclass of' (P279*) of 'sailboat'(Q1075310)
wdt:P31 ?instance_of; #'?boat' 'instance of' (P31) are '?instance_of'
wdt:P504 ?home_port . #'?boat' 'home port' (P504) are '?home_port'
#filter out home ports that are no longer current (home port (P504) with an 'end time' qualifier (P582))
?boat p:P504 ?statement1 .
?statement1 ps:P504 ?home_port .
FILTER NOT EXISTS { ?statement1 pq:P582 ?x }
?home_port wdt:P625 ?home_port_coord. #'?home_port' 'coordinate location' (P625) are '?home_port_coord'
OPTIONAL { ?boat wdt:P18 ?image . }
#'?boat" 'short name' (P1813) are '?boat_name'
#filter out names that are no longer current (short name (P1813) with an 'end time' qualifier (P582))
OPTIONAL {
?boat wdt:P1813 ?boat_name.
?boat p:P1813 ?statement2 .
?statement2 ps:P1813 ?boat_name .
FILTER NOT EXISTS { ?statement2 pq:P582 ?x }
}
#xxxLabel is the label for any variable called xxx
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
|
Sailboat Classes
editTable of a given sailboat class
editTABernacle list of a sailboat class: editable list of all J/92 sailboats
Map of all J/92 and J/92s home ports
editBased on the SPARQL query example Map and list of municipalities in The Netherlands
Replace Q97170629 / Q97179551 by a boat class to get a map of that boat class.
#Map of all J/92 (Q97170629) and J/92s (Q97179551) home ports (P504)
#boat = wikidata item id (qid)
#home_portLabel = home port name
#home_port_coord = home port coordinates
#boatLabel = wikidata item name
#boat_name (optional) = boat name
#image (optional) = picture
#defaultView:Map
SELECT DISTINCT ?boat ?boatLabel ?boat_name ?instance_ofLabel ?home_portLabel ?image ?home_port_coord WHERE {
{
?boat wdt:P31/wdt:P279* wd:Q97170629; #'?boat' are 'instance of'(P31) and any number of 'subclass of' (P279*) of 'J/92'(Q97170629)
wdt:P31 ?instance_of. #'?boat' 'instance of' (P31) are '?instance_of'
}
UNION
{
?boat wdt:P31/wdt:P279* wd:Q97179551; #'?boat' are 'instance of'(P31) and any number of 'subclass of' (P279*) of 'J/92s'(Q97179551)
wdt:P31 ?instance_of. #'?boat' 'instance of' (P31) are '?instance_of'
}
OPTIONAL {
?boat wdt:P504 ?home_port . #'?boat' 'home port' (P504) are '?home_port'
#filter out home ports that are no longer current (home port (P504) with an 'end time' qualifier (P582))
?boat p:P504 ?statement1 .
?statement1 ps:P504 ?home_port .
FILTER NOT EXISTS { ?statement1 pq:P582 ?x }
?home_port wdt:P625 ?home_port_coord. #'?home_port' 'coordinate location' (P625) are '?home_port_coord'
}
OPTIONAL { ?boat wdt:P18 ?image . }
#'?boat" 'short name' (P1813) are '?boat_name'
#filter out names that are no longer current (short name (P1813) with an 'end time' qualifier (P582))
OPTIONAL {
?boat wdt:P1813 ?boat_name.
?boat p:P1813 ?statement2 .
?statement2 ps:P1813 ?boat_name .
FILTER NOT EXISTS { ?statement2 pq:P582 ?x }
}
#xxxLabel is the label for any variable called xxx
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}