query-41a46dd3987431f3351a606a8d65e7f5
10:01, 7 February 2020 (UTC) Andy's edits; Talk to Andy); Pigsonthewing (Andy Mabbett. User:Andrew Gray and User:Jheald will. Also pinging TagishsimonThanks, all - both for the queries and the data cleanup suggestions. I'll work on the latter when I get time, and I bet 10:15, 7 February 2020 (UTC) Andy's edits; Talk to Andy); Pigsonthewing (Andy Mabbett, and its talk page. Wikidata:WikiProject British Politicians/ConstituenciesI've started documenting this at 10:10, 7 February 2020 (UTC)) talk (Tagishsimon although I'm not sure at this distance what I was wittering on about. Looks complicated and HMMV. --User talk:Andrew Gray#Constituency snafu?I left the ball in Andrew's court - 01:11, 8 February 2020 (UTC)) talk (Larske-- should be used instead.(P1889)different from doesn't have a Swedish description, just the label. But even if it is not a "signal for merging", I still think it would be good if this property could be avoided in case the object should be considered as "not the same". That's why I suggested that (P460)said to be the same as part that I now see is part of the English description. The property disputed: Sorry, I missed the Pigsonthewing@ 20:17, 7 February 2020 (UTC) Andy's edits; Talk to Andy); Pigsonthewing (Andy Mabbett. its creation proposal That's certainly not my understanding of its meaning, nor is it supported by the property's description (at least in English), or "an early signal that the item could/should be merged" 13:43, 7 February 2020 (UTC)) talk (Larske-- and other properties that varies over time.(P1410)number of seats in assembly The same could be applied also for qualifier.(P582)end time qualifier, the current value could be found by SPARQL filtering for that, i.e. ignore all statements with a (P582)end time -statements should lack a (P131)located in the administrative territorial entity of the at most one as qualifier. As (P582)end time and/or (P580)start time -statements, each with a relevant (P131)located in the administrative territorial entity has varied over time, you can use several (P131)located in the administrative territorial entity If the , like from "X" to "former X", to make the differenct more obvious.(P31)instance of . You may also want to change the not to merge them Qn. That will tell others (P1889)different from Qm and Qm (P1889)different from to both of them, i.e. Qn (P1889)different from If you have two (or more) different objects, Qn and Qm, that should be kept apart although they might have the same name and thus becomes mixed up, I think you should add the property is just an early signal that the item could/should be merged!(P460)said to be the same as The use of : Some comments:Andrew Gray@ 10:46, 7 February 2020 (UTC)) talk (Andrew GrayFinally, for "adjacent" - to be honest, this is something I'd never even thought of trying to model! Can't hurt to do it as suggested, though. : recently it seems we might have found a workaround for this, in which case we can import.JhealdGeoshapes are desirable but I have held off adding them due to concerns about copyright - my understanding was always that we need these to be CC-0 to go on Commons, though from a chat with @ P131 and so on are all on my "do in the fullness of time" list, but there are some thorny problems yet to figure out - most of the UK admin areas have changed substantially over time so it's not always clear quite what parent areas we should use for P131. (eg all the modern constituencies are mapped into regions - do we want to keep this approach for historic constituencies that pre-date the official regions) links are a bit of a problem - we don't have a clear property to describe what I want to say, which is "these are meaningfully different things with the same name, which are often treated as all being the same thing". We definitely want to keep them seperated, so please don't merge - at the moment there is one item for each distinct start/end, plus for substantial changes like a switch in the number of MPs.(P460)said to be the same as : Yes, there's definitely a lot of work needing doing here, and I haven't had as much time to work on it as I'd hoped. The Pigsonthewing, Tagishsimon, Larske@23:16, 7 February 2020 (UTC)) talk (Andrew Gray: Thanks - I'll get them all switched to "different from". I'm reluctant to use different P31s, though, as really this should be clear from the dates. Larske@17:06, 8 February 2020 (UTC)) talk (Andrew Gray: Running a switch to "different from" now (should be done and through to the query service in a couple of hours). Thanks for the advice :-) Larske@ 19:07, 7 February 2020 (UTC)) talk (Dipsacus fullonum: Jheald suggested using a federated query to the Ordnance Survey SPARQL endpoint. It works and here my version of that: --Andrew Gray, Pigsonthewing, Tagishsimon, Larske, Jheald@
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX ag: <http://data.ordnancesurvey.co.uk/ontology/admingeo/>
PREFIX sr: <http://data.ordnancesurvey.co.uk/ontology/spatialrelations/>
SELECT ?item ?itemLabel ?adjacentItem ?adjacentItemLabel
WHERE
{
{
SELECT ?item ?adjacent
WHERE
{
?item wdt:P31 wd:Q27971968.
?item wdt:P3120 ?TOID.
BIND(SUBSTR(?TOID,12,5) AS ?unitID)
SERVICE <http://data.ordnancesurvey.co.uk/datasets/os-linked-data/apis/sparql>
{
[] ag:hasUnitID ?unitID; sr:touches ?adjacent.
}
}
} BIND(SUBSTR(STR(?adjacent),37,16) AS ?adjacentTOID)
?adjacentItem wdt:P3120 ?adjacentTOID.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}