User:MartinPoulter/queries/hillforts
Most queries on this page have been enabled by a dump of 4147 records from the Atlas of Hillforts, an AHRC-funded project involving the universities of Oxford and Edinburgh.
Locations of hillforts that are in the Atlas
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , Atlas of Hillforts ID (P4102) , image (P18)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?image (URI(CONCAT("https://hillforts.arch.ox.ac.uk/?query=Atlas_of_Hillforts_4166_0%2CMain_Atlas_Number%2C",?atlas)) AS ?atlaslink) WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
wdt:P4102 ?atlas ;
rdfs:label ?label filter (lang(?label) = "en").
OPTIONAL{ ?subj wdt:P18 ?image }
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en")
} GROUP BY ?label ?subj ?typeLabel ?image ?atlas
Hillforts in the British Isles that are not in the Atlas, and probably need merging
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , Atlas of Hillforts ID (P4102) , image (P18)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?image WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
rdfs:label ?label filter (lang(?label) = "en").
MINUS { ?subj wdt:P4102 ?atlas }
OPTIONAL{ ?subj wdt:P18 ?image }
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?typeLabel ?image
Hillforts with an image
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , image (P18)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?image WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
wdt:P18 ?image ;
rdfs:label ?label filter (lang(?label) = "en").
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?typeLabel ?image
Hillforts with a plan image
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , image of design plans (P3311)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?planimage WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
wdt:P3311 ?planimage ;
rdfs:label ?label filter (lang(?label) = "en").
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?typeLabel ?planimage
Hillforts with a video
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , video (P10)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?video WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
wdt:P10 ?video ;
rdfs:label ?label filter (lang(?label) = "en").
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?typeLabel ?video
Table of IDs and Commons images
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102) , image (P18)
SELECT ?atlas ?image WHERE { ?subj wdt:P4102 ?atlas ; wdt:P18 ?image . } ORDER BY ?atlas
Hillforts without an image
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , image (P18)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
rdfs:label ?label filter (lang(?label) = "en").
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
MINUS{?subj wdt:P18 []}
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?typeLabel
Hillforts linked to a Commons category
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , Commons category (P373)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?commons WHERE
{ ?subj wdt:P31/wdt:P279? ?type ;
wdt:P625 ?coord ;
wdt:P31 ?type ;
wdt:P373 ?commons ;
rdfs:label ?label filter (lang(?label) = "en").
?type wdt:P279? wd:Q744099 ;
rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?typeLabel ?commons
Wikidata mapping to Atlas IDs and vice versa
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102)
SELECT DISTINCT ?subj ?atlasID WHERE { ?subj wdt:P4102 ?atlasID } ORDER BY ?atlasID
For baffling reasons, this query when I try it misses Tredegar Fort (Q31055740).
Hillforts with data from the Atlas and an article in English Wikipedia
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , Atlas of Hillforts ID (P4102)
SELECT DISTINCT ?subj (URI(CONCAT("https://hillforts.arch.ox.ac.uk/?query=Atlas_of_Hillforts_4166_0%2CMain_Atlas_Number%2C", ?atlasID)) AS ?atlas) ?english WHERE { ?subj wdt:P31/wdt:P279? wd:Q744099 ; wdt:P4102 ?atlasID . ?english schema:about ?subj ; schema:isPartOf <https://en.wikipedia.org/> } ORDER BY ?atlasID
Hillforts with data from the Atlas and an article in Welsh Wicipedia
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279) , Atlas of Hillforts ID (P4102)
SELECT DISTINCT ?subj (URI(CONCAT("https://hillforts.arch.ox.ac.uk/?query=Atlas_of_Hillforts_4166_0%2CMain_Atlas_Number%2C", ?atlasID)) AS ?atlas) ?cymraeg WHERE { ?subj wdt:P31/wdt:P279? wd:Q744099 ; wdt:P4102 ?atlasID . ?cymraeg schema:about ?subj ; schema:isPartOf <https://cy.wikipedia.org/> } ORDER BY ?atlasID
Types of hillfort
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: subclass of (P279) , reference URL (P854)
SELECT ?type ?typeLabel ?typeDescription ?link WHERE { ?type p:P279 ?s . ?s ps:P279 wd:Q744099 ; prov:wasDerivedFrom/pr:P854 ?link SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"} }
Hillforts from the Atlas that share a National Heritage List for England number with another site
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102) , National Heritage List for England number (P1216) , image (P18)
SELECT ?site1 ?site2 ?site1Label ?site2Label WHERE { ?site1 wdt:P4102 ?atlas; wdt:P1216 ?scheduled. ?site2 wdt:P1216 ?scheduled. MINUS{?site2 wdt:P4102 []} # ?site2 wdt:P18 [] SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"} }
Just the promontory forts
edit1242 of them!
The following query uses these:
- Items: promontory fort (Q92086)
- Properties: instance of (P31) , coordinate location (P625) , Atlas of Hillforts ID (P4102) , image (P18)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label (SAMPLE(?coord) AS ?where) ?subj ?image (URI(CONCAT("https://hillforts.arch.ox.ac.uk/?query=Atlas_of_Hillforts_4166_0%2CMain_Atlas_Number%2C",?atlas)) AS ?atlaslink) WHERE
{ ?subj wdt:P31 wd:Q92086 ;
wdt:P625 ?coord ;
wdt:P4102 ?atlas ;
rdfs:label ?label filter (lang(?label) = "en").
OPTIONAL{ ?subj wdt:P18 ?image }
?subj p:P625/psv:P625 ?loc. # coordinate-location statement
?loc wikibase:geoLatitude ?lat .
?loc wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
} GROUP BY ?label ?subj ?image ?atlas
Things that hillforts are types of, that are not types of hillfort, e.g. ruins
editThe following query uses these:
- Items: hillfort (Q744099)
- Properties: Atlas of Hillforts ID (P4102) , instance of (P31) , subclass of (P279)
SELECT ?label ?subj ?atlas (GROUP_CONCAT(?typeLabel; separator=", ") AS ?types) WHERE { ?subj wdt:P4102 ?atlas ; wdt:P31 ?type ; rdfs:label ?label filter (lang(?label) = "en"). MINUS{?type wdt:P279? wd:Q744099 } ?type rdfs:label ?typeLabel filter (lang(?typeLabel) = "en"). } GROUP BY ?label ?subj ?atlas ORDER BY ?types
Hillfort names that are in ALL CAPS
editThis was a problem with 3% of the initial upload, but is now fixed and so query should return no results.
The following query uses these:
- Items: hillfort (Q744099)
- Properties: instance of (P31) , subclass of (P279)
SELECT ?subj ?label WHERE { ?subj wdt:P31/wdt:P279? wd:Q744099 ; rdfs:label ?label filter (lang(?label) = "en"). FILTER(UCASE(?label) = ?label) }
Hillfort co-ordinates with excessive precision
editThe following query uses these:
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625) , Atlas of Hillforts ID (P4102)
SELECT DISTINCT ?subj ?coord ?label WHERE { ?subj wdt:P31/wdt:P279? ?type ; wdt:P625 ?coord ; wdt:P4102 ?atlas ; rdfs:label ?label filter (lang(?label) = "en"). FILTER (STRLEN(STR(?coord)) > 23) }
Other identifiers for hillfort sites
editDigital Atlas of the Roman Empire
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102) , Digital Atlas of the Roman Empire ID (P1936)
SELECT ?subj ?label ?atlasID (URI(CONCAT("http://dare.ht.lu.se/places/",?roman,".html")) AS ?romanlink) WHERE { ?subj wdt:P4102 ?atlasID ; wdt:P1936 ?roman ; rdfs:label ?label filter (lang(?label) = "en") } ORDER BY ?atlasID
Hillforts in the Atlas with labels in non-English languages
editWelsh
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102)
SELECT ?subj ?label WHERE { ?subj wdt:P4102 ?atlasID ; rdfs:label ?label filter (lang(?label) = "cy") }
Scottish Gaelic
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102)
SELECT ?subj ?label WHERE { ?subj wdt:P4102 ?atlasID ; rdfs:label ?label filter (lang(?label) = "gd") }
Irish
editThe following query uses these:
- Properties: Atlas of Hillforts ID (P4102)
SELECT ?subj ?label WHERE { ?subj wdt:P4102 ?atlasID ; rdfs:label ?label filter (lang(?label) = "g1") }
Archaeological sites of all kinds in a lat/long box placing them in the British Isles
editThe following query uses these:
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label ?loc ?subj
WHERE
{
?subj wdt:P31/wdt:P279* wd:Q839954 ; # site or subtype
wdt:P625 ?loc ; # location to plot on map
p:P625/psv:P625 ?coord; # coordinate-location statement
rdfs:label ?label filter (lang(?label) = "en").
?coord wikibase:geoLatitude ?lat .
?coord wikibase:geoLongitude ?long .
FILTER (?lat > 49) FILTER (?lat < 63)
FILTER (?long > -10.5) FILTER (?long < 2.02)
}
Archaeological sites and fortifications of all kinds in a lat/long box placing them in the Isle of Man
editThe following query uses these:
- Properties: instance of (P31) , subclass of (P279) , coordinate location (P625)
Features: map (Q24515275)
#defaultView:Map
SELECT ?label ?loc ?subj
WHERE
{
{ ?subj wdt:P31/wdt:P279* wd:Q839954 } UNION { ?subj wdt:P31/wdt:P279* wd:Q57821 } # site or subtype / hillfort or subtype
?subj wdt:P625 ?loc ; # location to plot on map
p:P625/psv:P625 ?coord; # coordinate-location statement
rdfs:label ?label filter (lang(?label) = "en").
?coord wikibase:geoLatitude ?lat .
?coord wikibase:geoLongitude ?long .
FILTER (?lat > 53.845) FILTER (?lat < 54.554)
FILTER (?long > -5.17) FILTER (?long < -3.96)
}