Property talk:P5207
Documentation
BAG openbare ruimtecode for Dutch public spaces, notably streets and roads in the Netherlands; format: 16 digits
List of violations of this constraint: Database reports/Constraint violations/P5207#Single value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Unique value, SPARQL (every item), SPARQL (by value)
List of violations of this constraint: Database reports/Constraint violations/P5207#Type Q294440, Q355304, Q123414165, Q11888176, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Item P17, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Item P131, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Item P625, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Entity types
List of violations of this constraint: Database reports/Constraint violations/P5207#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Label in 'nl' language, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Label in 'en' language, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Description in 'nl' language, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P5207#Description in 'en' language, search, SPARQL
street (Q79007) (and subclasses) with country (P17) Netherlands (Q55) that don't have a BAG public space ID (P5207) link and don't have dissolved, abolished or demolished date (P576) (Help)
Violations query:
SELECT DISTINCT ?item WHERE { ?item wdt:P31/wdt:P279* wd:Q79007 ; wdt:P17 wd:Q55 . MINUS { ?item wdt:P5207 [] } . MINUS { ?item wdt:P576 [] } . MINUS { ?item wdt:P527/wdt:P5207 [] } . } LIMIT 2000
List of this constraint violations: Database reports/Complex constraint violations/P5207#Streets in the Netherlands without BAG link
Constraints[edit]
@Husky, Denengelse: ik heb een hoop constraints toegevoegd. Moeten maar even kijken hoe nuttig deze blijken te zijn. Het is in ieder geval fijn dat foutjes zoals Weesperzijde (Q2227090) meteen boven water komen. Multichill (talk) 18:04, 31 May 2018 (UTC)
@Multichill: constraints 'adres' en 'postcode' zijn raar, een pand heeft vaak een adres, maar een straat niet.--Denengelse (talk) 10:05, 10 January 2019 (UTC)
Water in Haarlem[edit]
select *
with {
SELECT ?item ?weg ?label {
SERVICE <http://lov.okfn.org/dataset/lov/sparql> {
SERVICE <https://data.pdok.nl/sparql> {
select ?weg ?label
where {
?weg <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bag.basisregistraties.overheid.nl/def/bag#OpenbareRuimte> .
?weg <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bag.basisregistraties.overheid.nl/def/bag#Water> .
?weg <http://bag.basisregistraties.overheid.nl/def/bag#status> <http://bag.basisregistraties.overheid.nl/id/begrip/NaamgevingUitgegeven> .
MINUS { ?weg <http://bag.basisregistraties.overheid.nl/def/bag#status> <http://bag.basisregistraties.overheid.nl/id/begrip/NaamgevingIngetrokken> } .
?weg <http://www.w3.org/2000/01/rdf-schema#label> ?label .
?weg <http://bag.basisregistraties.overheid.nl/def/bag#bijbehorendeWoonplaats> <http://bag.basisregistraties.overheid.nl/bag/id/woonplaats/2907>
}
}
}
}
} as %bag
with {
SELECT DISTINCT ?item ?label ?baglink WHERE {
?item rdfs:label ?label .
?item wdt:P131 wd:Q9920 .
?item wdt:P31/wdt:P279* wd:Q355304 .
OPTIONAL { ?item wdtn:P5207 ?baglink } .
}
} as %wd
where {
include %bag .
OPTIONAL {include %wd }.
}
Multichill (talk) 20:36, 31 May 2018 (UTC)
straten in Haarlem[edit]
Ik heb voor Haarlem links gemaakt gebaseerd op de naam. Zullen wel een paar foutjes inzitten, maar is denk ik goed om ergens uit te proberen.
Deze query geeft de lijst van nog aan elkaar kan worden geplakt. Export naar TSV, regex er overheen met je favoriete editor en dan in QuickStatements om het toe te voegen.
@Multichill: Pas op, onderstaande query geeft verkeerde matches als er in 1 gemeente meerdere straten met dezelfde naam voorkomen (dit komt vaak voor bij gemeenten die uit meerdere dorpen bestaan, ter illustratie heb ik de query aangepast naar woonplaats Doorn / gemeente Utrechtse Heuvelrug). Ik heb ?description aan de query toegevoegd, daar staat meestal iets als "straat in Doorn" in. Dan kan je daarop checken als je Quickstatements genereert. --Denengelse (talk) 08:16, 28 August 2019 (UTC)
SELECT ?item ?weg ?label ?description
WITH {
SELECT DISTINCT ?item ?description (?wikilabel AS ?label) WHERE {
?item rdfs:label ?wikilabel .
?item wdt:P131 wd:Q9920 .
?item wdt:P31/wdt:P279* wd:Q79007 .
MINUS { ?item wdt:P5207 [] } .
?item schema:description ?description.
FILTER ( lang(?description) = "nl" ).
FILTER ( lang(?wikilabel) = "nl" ).
}
} AS %wikidata
WITH {
SELECT ?weg (?baglabel AS ?label) {
SERVICE <http://lov.okfn.org/dataset/lov/sparql> {
SERVICE <https://data.pdok.nl/sparql> {
?weg <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bag.basisregistraties.overheid.nl/def/bag#OpenbareRuimte> .
?weg <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bag.basisregistraties.overheid.nl/def/bag#Weg> .
?weg <http://bag.basisregistraties.overheid.nl/def/bag#status> <http://bag.basisregistraties.overheid.nl/id/begrip/NaamgevingUitgegeven> .
MINUS { ?weg <http://bag.basisregistraties.overheid.nl/def/bag#status> <http://bag.basisregistraties.overheid.nl/id/begrip/NaamgevingIngetrokken> } .
?weg <http://www.w3.org/2000/01/rdf-schema#label> ?baglabel .
?weg <http://bag.basisregistraties.overheid.nl/def/bag#bijbehorendeWoonplaats> <http://bag.basisregistraties.overheid.nl/bag/id/woonplaats/2907>
}
}
}
} AS %weg
WHERE {
INCLUDE %wikidata.
INCLUDE %weg.
}
Met deze query krijg je de straten in Haarlem op Wikidata die nog geen link hebben:
SELECT DISTINCT ?item (?wikilabel AS ?label) WHERE {
?item rdfs:label ?wikilabel .
?item wdt:P131 wd:Q9920 .
?item wdt:P31/wdt:P279* wd:Q79007 .
MINUS { ?item wdt:P5207 [] } .
} LIMIT 2000
En met deze query krijg je de straten in Haarlem in de BAG waar geen Wikidata link naartoe is:
SELECT ?weg (?baglabel AS ?label) {
SERVICE <http://lov.okfn.org/dataset/lov/sparql> {
SERVICE <https://data.pdok.nl/sparql> {
?weg <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bag.basisregistraties.overheid.nl/def/bag#OpenbareRuimte> .
?weg <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bag.basisregistraties.overheid.nl/def/bag#Weg> .
?weg <http://bag.basisregistraties.overheid.nl/def/bag#status> <http://bag.basisregistraties.overheid.nl/id/begrip/NaamgevingUitgegeven> .
MINUS { ?weg <http://bag.basisregistraties.overheid.nl/def/bag#status> <http://bag.basisregistraties.overheid.nl/id/begrip/NaamgevingIngetrokken> } .
?weg <http://www.w3.org/2000/01/rdf-schema#label> ?baglabel .
?weg <http://bag.basisregistraties.overheid.nl/def/bag#bijbehorendeWoonplaats> <http://bag.basisregistraties.overheid.nl/bag/id/woonplaats/2907>
}
}
MINUS { ?item wdtn:P5207 ?weg }
}
En tenslotte een leuk kaartje:
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?baglink ?coordinates WHERE {
?item rdfs:label ?wikilabel .
?item wdt:P131 wd:Q9920 .
?item wdt:P31/wdt:P279* wd:Q79007 .
?item wdtn:P5207 ?baglink .
?item wdt:P625 ?coordinates
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl". }
}
Als deze aanpakt een beetje werkt en bevalt kan het natuurlijk zo voor andere plekken worden gedaan. Multichill (talk) 21:45, 31 May 2018 (UTC)
Twee id's op een straat/gracht[edit]
In sommige gevallen hebben we twee id's op een item, zie bijvoorbeeld Nieuwe Gracht (Q17195901) en Nieuwe Keizersgracht (Q2394887). Wat zullen we als separator (P4155) gebruiken? applies to part (P518) of subject has role (P2868). @Paulbe, Denengelse: wat denken jullie? Multichill (talk) 11:39, 6 July 2019 (UTC)
De BAG ziet water en straat echt als twee verschillende dingen, maar hier op Wikidata lijkt mij één entiteit met applies to part (P518) het mooist. --Denengelse (talk) 17:26, 6 July 2019 (UTC)
- Tsja, dat is lastig... Soms is zoiets, op bijv nl-wp, één lemma, maar dat is natuurlijk niet doorslaggevend. (Straat/weg en waterlichaam/kanaal horen, volgens mij in principe, als er over allebei concrete verschillende feiten beschikbaar zijn ~ dwz meer dan het verschil tussen land en water en een verschillend Bag-nummer ~ , een verschillend item op Wikipedia te krijgen.)
- Het koste me even wat moeite (op dit tijdstip) om het begrip separator/separator (P4155) tot me door te laten dringen. Kennelijk gaat hier om een nadere kwalificatie (qualifier/sub-property) bij de "instance"-eigenschap instance of (P31), die normaliter slechts één waarde zou kunnen en mogen hebben.
- Omdat het uiteindelijk hier toch om verschillende (onderscheidbare) "dingen" gaat, lijkt het mij ook beter om applies to part (P518) te gebruiken. subject has role (P2868) is echt bedoeld voor als het om één (niet scheidbaar) persoon/ding/begrip gaat met verschillende functies/rollen. Paulbe (talk) 21:58, 7 July 2019 (UTC)
- Netherlands-related properties
- All Properties
- Properties with external-id-datatype
- Properties used on 100000+ items
- Properties with single value constraints
- Properties with unique value constraints
- Properties with format constraints
- Properties with constraints on type
- Properties with constraints on items using them
- Properties with entity type constraints
- Properties with scope constraints
- Properties with label language constraints
- Properties with description language constraints
- Properties with complex constraints