Property talk:P5207

Latest comment: 4 years ago by Denengelse in topic straten in Haarlem

Documentation

BAG public space ID
BAG openbare ruimtecode for Dutch public spaces, notably streets and roads in the Netherlands; format: 16 digits
Representsbasic register addresses and buildings (Q2274762)
Data typeExternal identifier
Domainpublic space (Q294440), watercourse (Q355304), road or street (Q123414165) or surface water body (Q11888176)
Allowed values\d{16} (numeric string with 16 digits)
ExampleAambeeldstraat (Q18927441)0363300000002626 (RDF)
Dam Square (Q839050)0363300000003186 (RDF)
Sourcehttps://bag.basisregistraties.overheid.nl/
Formatter URLhttps://bag.basisregistraties.overheid.nl/bag/id/openbare-ruimte/$1
Tracking: usageCategory:Pages using Wikidata property P5207 (Q56243132)
Related to country  Netherlands (Q55) (See 107 others)
See alsoBAG residence ID (P981), BAG building ID (P5208), Czech street ID (P4533), FANTOIR code (P3182), road number (Estonia) (P5093), Unique Street Reference Number (P8447), Danmarks Adresseregister named street ID (P9221), Austrian Street ID (P10198)
Lists
Proposal discussionProposal discussion
Current uses
Total231,899
Main statement231,894>99.9% of uses
Qualifier3<0.1% of uses
Reference2<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Single value, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Unique value, SPARQL (every item), SPARQL (by value)
Format “\d{16}: value must be formatted using this pattern (PCRE syntax). (Help)
List of violations of this constraint: Database reports/Constraint violations/P5207#Format, hourly updated report, SPARQL
Item “country (P17): Netherlands (Q55): Items with this property should also have “country (P17): Netherlands (Q55)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Item P17, search, SPARQL
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Item P131, search, SPARQL
Item “coordinate location (P625): Items with this property should also have “coordinate location (P625)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Item P625, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Entity types
Scope is as main value (Q54828448), as reference (Q54828450): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Scope, SPARQL
Label required in languages: nl: Entities using this property should have labels in one of the following languages: nl (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Label in 'nl' language, search, SPARQL
Label required in languages: en: Entities using this property should have labels in one of the following languages: en (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Label in 'en' language, search, SPARQL
Description required in languages: nl: Entities using this property should have descriptions in one of the following languages: nl (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Description in 'nl' language, search, SPARQL
Description required in languages: en: Entities using this property should have descriptions in one of the following languages: en (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P5207#Description in 'en' language, search, SPARQL
 
Streets in the Netherlands without BAG link
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)Reply

@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)Reply

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 }.
}
Try it!

Multichill (talk) 20:36, 31 May 2018 (UTC)Reply

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)Reply

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.
}
Try it!

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
Try it!

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 } 
  }
Try it!

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". }
  }
Try it!

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)Reply

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)Reply

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)Reply

  • 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)Reply
Return to "P5207" page.