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 AtlasEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 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
 3 {  ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       wdt:P4102  ?atlas ;
 7       rdfs:label ?label filter (lang(?label) = "en").
 8 OPTIONAL{ ?subj wdt:P18 ?image } 
 9 ?type wdt:P279? wd:Q744099 ;
10     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en")
11 } GROUP BY ?label ?subj ?typeLabel ?image ?atlas

Hillforts in the British Isles that are not in the Atlas, and probably need mergingEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?image WHERE
 3 { ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       rdfs:label ?label filter (lang(?label) = "en").
 7 MINUS { ?subj wdt:P4102 ?atlas }
 8 OPTIONAL{ ?subj wdt:P18 ?image } 
 9 ?type wdt:P279? wd:Q744099 ;
10     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
11 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
12   ?loc wikibase:geoLatitude ?lat .
13   ?loc wikibase:geoLongitude ?long .
14    FILTER (?lat > 49) FILTER (?lat < 63)
15    FILTER (?long > -10.5) FILTER (?long < 2.02) 
16 } GROUP BY ?label ?subj ?typeLabel ?image

Hillforts with an imageEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?image WHERE
 3 {  ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       wdt:P18 ?image ;
 7       rdfs:label ?label filter (lang(?label) = "en").
 8 ?type wdt:P279? wd:Q744099 ;
 9     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
10 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
11   ?loc wikibase:geoLatitude ?lat .
12   ?loc wikibase:geoLongitude ?long .
13    FILTER (?lat > 49) FILTER (?lat < 63)
14    FILTER (?long > -10.5) FILTER (?long < 2.02) 
15 } GROUP BY ?label ?subj ?typeLabel ?image

Hillforts with a plan imageEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?planimage WHERE
 3 {  ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       wdt:P3311 ?planimage ;
 7       rdfs:label ?label filter (lang(?label) = "en").
 8 ?type wdt:P279? wd:Q744099 ;
 9     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
10 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
11   ?loc wikibase:geoLatitude ?lat .
12   ?loc wikibase:geoLongitude ?long .
13    FILTER (?lat > 49) FILTER (?lat < 63)
14    FILTER (?long > -10.5) FILTER (?long < 2.02) 
15 } GROUP BY ?label ?subj ?typeLabel ?planimage

Hillforts with a videoEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?video WHERE
 3 {  ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       wdt:P10 ?video ;
 7       rdfs:label ?label filter (lang(?label) = "en").
 8 ?type wdt:P279? wd:Q744099 ;
 9     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
10 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
11   ?loc wikibase:geoLatitude ?lat .
12   ?loc wikibase:geoLongitude ?long .
13    FILTER (?lat > 49) FILTER (?lat < 63)
14    FILTER (?long > -10.5) FILTER (?long < 2.02) 
15 } GROUP BY ?label ?subj ?typeLabel ?video

Table of IDs and Commons imagesEdit

The following query uses these:

Hillforts without an imageEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) WHERE
 3 {  ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       rdfs:label ?label filter (lang(?label) = "en").
 7 ?type wdt:P279? wd:Q744099 ;
 8     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
 9 MINUS{?subj wdt:P18 []}
10 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
11   ?loc wikibase:geoLatitude ?lat .
12   ?loc wikibase:geoLongitude ?long .
13    FILTER (?lat > 49) FILTER (?lat < 63)
14    FILTER (?long > -10.5) FILTER (?long < 2.02) 
15 } GROUP BY ?label ?subj ?typeLabel

Hillforts linked to a Commons categoryEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label (SAMPLE(?coord) AS ?where) ?subj (?typeLabel AS ?layer) ?commons WHERE
 3 {  ?subj wdt:P31/wdt:P279? ?type ;
 4       wdt:P625 ?coord ;
 5       wdt:P31 ?type ;
 6       wdt:P373 ?commons ;
 7       rdfs:label ?label filter (lang(?label) = "en").
 8 ?type wdt:P279? wd:Q744099 ;
 9     rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
10 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
11   ?loc wikibase:geoLatitude ?lat .
12   ?loc wikibase:geoLongitude ?long .
13    FILTER (?lat > 49) FILTER (?lat < 63)
14    FILTER (?long > -10.5) FILTER (?long < 2.02) 
15 } GROUP BY ?label ?subj ?typeLabel ?commons

Wikidata mapping to Atlas IDs and vice versaEdit

The following query uses these:

For baffling reasons, this query when I try it misses Tredegar Fort (Q31055740).

Hillforts with data from the Atlas and an article in English WikipediaEdit

The following query uses these:

  • Properties: instance of (P31)     , subclass of (P279)     , Atlas of Hillforts ID (P4102)     
    1 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
    2 { ?subj wdt:P31/wdt:P279? wd:Q744099 ;
    3   wdt:P4102 ?atlasID .
    4 ?english schema:about ?subj ; schema:isPartOf <https://en.wikipedia.org/>
    5 } ORDER BY ?atlasID
    

Hillforts with data from the Atlas and an article in Welsh WicipediaEdit

The following query uses these:

  • Properties: instance of (P31)     , subclass of (P279)     , Atlas of Hillforts ID (P4102)     
    1 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
    2 { ?subj wdt:P31/wdt:P279? wd:Q744099 ;
    3   wdt:P4102 ?atlasID .
    4 ?cymraeg schema:about ?subj ; schema:isPartOf <https://cy.wikipedia.org/>
    5 } ORDER BY ?atlasID
    

Types of hillfortEdit

The following query uses these:

  • Properties: subclass of (P279)     , reference URL (P854)     
    1 SELECT ?type ?typeLabel ?typeDescription ?link WHERE
    2 {  ?type p:P279 ?s .
    3    ?s ps:P279 wd:Q744099 ;
    4     prov:wasDerivedFrom/pr:P854 ?link
    5 SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
    6 }
    

Hillforts from the Atlas that share a National Heritage List for England number with another siteEdit

The following query uses these:

Just the promontory fortsEdit

1242 of them!

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 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
 3 { ?subj wdt:P31 wd:Q92086 ;
 4       wdt:P625 ?coord ;
 5       wdt:P4102  ?atlas ;
 6       rdfs:label ?label filter (lang(?label) = "en").
 7 OPTIONAL{ ?subj wdt:P18 ?image }
 8 ?subj p:P625/psv:P625 ?loc. # coordinate-location statement
 9   ?loc wikibase:geoLatitude ?lat .
10   ?loc wikibase:geoLongitude ?long .
11    FILTER (?lat > 49) FILTER (?lat < 63)
12    FILTER (?long > -10.5) FILTER (?long < 2.02) 
13 } GROUP BY ?label ?subj ?image ?atlas

Things that hillforts are types of, that are not types of hillfort, e.g. ruinsEdit

The following query uses these:

  • Properties: Atlas of Hillforts ID (P4102)     , instance of (P31)     , subclass of (P279)     
    1 SELECT ?label ?subj ?atlas (GROUP_CONCAT(?typeLabel; separator=", ") AS ?types) WHERE
    2 {  ?subj wdt:P4102 ?atlas ;
    3       wdt:P31 ?type ;
    4       rdfs:label ?label filter (lang(?label) = "en").
    5  MINUS{?type wdt:P279? wd:Q744099 }
    6  ?type rdfs:label ?typeLabel filter (lang(?typeLabel) = "en").
    7 } GROUP BY ?label ?subj ?atlas ORDER BY ?types
    

Hillfort names that are in ALL CAPSEdit

This 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:

  • Properties: instance of (P31)     , subclass of (P279)     
    1 SELECT ?subj ?label WHERE
    2 {  ?subj wdt:P31/wdt:P279? wd:Q744099 ;
    3       rdfs:label ?label filter (lang(?label) = "en").
    4 FILTER(UCASE(?label) = ?label)
    5 }
    

Hillfort co-ordinates with excessive precisionEdit

The following query uses these:

Other identifiers for hillfort sitesEdit

Digital Atlas of the Roman EmpireEdit

The following query uses these:

Hillforts in the Atlas with labels in non-English languagesEdit

WelshEdit

The following query uses these:

Scottish GaelicEdit

The following query uses these:

IrishEdit

The following query uses these:

Archaeological sites of all kinds in a lat/long box placing them in the British IslesEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label ?loc ?subj
 3 WHERE
 4 {
 5    ?subj wdt:P31/wdt:P279* wd:Q839954 ; # site or subtype
 6       wdt:P625 ?loc ; # location to plot on map
 7           p:P625/psv:P625 ?coord; # coordinate-location statement
 8       rdfs:label ?label filter (lang(?label) = "en").
 9   ?coord wikibase:geoLatitude ?lat .
10   ?coord wikibase:geoLongitude ?long .
11    FILTER (?lat > 49) FILTER (?lat < 63)
12    FILTER (?long > -10.5) FILTER (?long < 2.02) 
13 }

Archaeological sites and fortifications of all kinds in a lat/long box placing them in the Isle of ManEdit

The following query uses these:

Features: Map (Q24515275)     

 1 #defaultView:Map
 2 SELECT ?label ?loc ?subj
 3 WHERE
 4 {
 5    { ?subj wdt:P31/wdt:P279* wd:Q839954 } UNION { ?subj wdt:P31/wdt:P279* wd:Q57821 } # site or subtype / hillfort or subtype
 6    ?subj   wdt:P625 ?loc ; # location to plot on map
 7           p:P625/psv:P625 ?coord; # coordinate-location statement
 8       rdfs:label ?label filter (lang(?label) = "en").
 9   ?coord wikibase:geoLatitude ?lat .
10   ?coord wikibase:geoLongitude ?long .
11    FILTER (?lat > 53.845) FILTER (?lat < 54.554)
12    FILTER (?long > -5.17) FILTER (?long < -3.96) 
13 }