FR:Wikidata

From OpenStreetMap Wiki
Jump to navigation Jump to search

broom

Help (89606) - The Noun Project.svg

Wikidata-logo-en.svg

Wikidata est une base de connaissances libre éditée de manière collaborative et hébergée par la Wikimedia Foundation. Elle permet de centraliser les données utilisées par différents projets Wikimedia (Wikipedia, Wikivoyage...). De façon similaire à Wikipédia, tout le monde peut éditer Wikidata. Le contenu de Wikidata est sous licence CC0 ("domaine publique"). Il n'est généralement pas possible d'importer des données de Wikidata dans OSM à cause des incompatibilités de licences.

Pourquoi faire le lien entre OSM et Wikidata ?

Tim Berners-Lee a défini dans “les cinq étoiles des données ouvertes”, le cinquième et plus haut niveau comme le fait de “relier votre donnée à d'autres données afin de fournir du contexte”. En insérant un ID Wikidata (que le logiciel interprète comme un URI) dans un objet OSM, on lie ce dernier à un objet sur Wikidata (qui s'appelle un "item"), et de là, directement et indirectement, à plusieurs autres items Wikidata, et à des objets dans plusieurs autres systèmes. Cela fait d'OSM un élément du graphe de Linked Open Data plutôt qu'un système isolé.

Plus concrètement, cela permet à toute personne faisait une requête dans OSM de récupérer, à propos d'un objet OSM, des données supplémentaires, et des liens vers d'autres bases de données. Par exemple, on peut récupérer la population d'une ville, à l'époque actuelle ou à différents moments de son histoire, ou encore la date et le lieu de naissance, voire le portrait, de l'architecte d'un bâtiment, ou un lien vers un système fournissant le volume de précipitations de la semaine précédente dans une réserve naturelle.

La possibilité d'utiliser Wikidata comme 'ID intermédiaire' devrait permettre d'éviter dans OSM la multiplication des attributs pointant vers des systèmes/bases de données externes, et le travail de maintenance afférent.

Inclure des tags Wikidata dans OSM signifie que les objets OSM peuvent être découverts et utilisés par d'autres systèmes, comme les Infobox sur Wikimedia Commons, etc. (voir la section sur les Utilisations).

Wikidata n'est pas Wikipédia

Wikidata contient des données provenant de nombreuses autres sources que Wikipédia. De nombreux items Wikidata ont été initialement créés à partir de pages Wikipédia, mais les données ont été retravaillées dans Wikidata.

Les items Wikidata pointent vers des articles Wikipédia dans de nombreuses langues ; ces articles peuvent être assez différents les uns des autres. La richesse principale de Wikidata, ce sont les données que la base elle-même contient ; ce n'est pas juste un raccourci vers le contenu de Wikipédia.

Linking from OSM to Wikidata

WdOsm-semanticBridge.jpg

Les entités Wikidata peuvent être liées à n'importe quel type d'objet dans OSM au moyen de la clé wikidata=*. La clé a un format 'Qnnnnn', par exemple Q936 qui est OpenStreetMap. L'avantage de ces clés, c'est qu'elles sont valables dans toutes les langues, mais elles n'ont pas un sens compréhensible par un être humains, à la différence d'autres clés d'OSM.

Il n'y a pas de correspondance biunivoque entre OSM et Wikidata : un élément Wikidata peut correspondre à plusieurs objets différents dans la base de données OSM ; par exemple, une commune (boundary=administrative), place=neighborhood, place=city, et place=island peuvent porter le même nom, mais être cartographiées de différentes manières dans OSM. Et certains éléments Wikidata représentent des choses qui peuvent être cartographiées comme plusieurs objets consécutifs dans OSM (par exemple, les longues rues ou les cours d'eau).

On peut aussi créer des liens vers des objets en utilisant wikipedia=*, mais il faut savoir que Wikidata est plus détaillé, et ressemble davantage à une base de données que Wikipedia. L'attribut wikipedia=* a l'avantage d'être compréhensible par un être humain.

Parfois, il y a des doublons dans Wikidata ; quand le doublon est découvert, l'un des éléments (généralement le plus récent) devient une simple redirection vers l'autre. OSM ne doit pas pointer vers un objet servant de redirection, car le lien peut être ignoré dans certaines requêtes.

Wikidata comme sous-clé

Article principal : Key:wikidata#Secondary Wikidata links
  • brand:wikidata=* est utilisé pour préciser que des boutiques (etc.) font partie d'une marque, comme par exemple "Burger King" Q177054. On peut l'utiliser en complément de brand=Burger King, qui est compréhensible pour un être humain. Le Name Suggestion Index suggère brand:wikidata=* parmi d'autres attributs ; il est utilisé dans iD, Vespucci, JOSM et d'autres éditeurs.
  • operator:wikidata=* est similaire à l'attribut de marque, mais peut désigner un membre d'une franchise.
  • species:wikidata=* est une forme complémentaire (pour l'ordinateur) de species=*, pour les arbres.
  • network:wikidata=* est une forme complémentaire (pour l'ordinateur) de network=*, pour les réseaux de routes, ou encore les distributeurs automatiques de banque.

Outils

Les outils comme WIWOSM permettent de vérifier l'utilisation correcte de cet attribut. Les données peuvent facilement être vérifiées avec le Wikidata+OSM Service de requêtes SPARQL, qui peut mettre en valeur les différences et les erreurs.

wikidata=* item identifiers can be added to OSM elements by using:

  • The ID online editor – see “Connecting OpenStreetMap and Wikidata” (Mapbox blog post).
  • The JOSM editor with these additional plugins:
    • JOSM/Plugins/Wikipedia – has a button to query Wikidata and can open a selected Wikidata item in the browser.
      Note that coordinates can be copied directly from within JOSM to a Wikidata item; just select an appropriate node, press Ctrl+ Maj+C then paste to the “Geographical coordinates” field of the item.
    • JOSM/Plugins/Tag2Link – open Wikidata item in browser.
  • OSM Wikidata Explorer – visualize the distance between OSM and Wikidata coordinates (data doesn't appear to have been updated since summer of 2017).
  • OSMgadget – a Mediawiki gadget to pull in OSM data while viewing Wikipedia.
  • OSM ↔ Wikidata (osm.wikidata.link) – detects possible matches and allows quickly adding them to OSM.
  • Wikipedia where in OSM is a project to show for a Wikipedia article geometric objects from OpenStreetMap.

Outils de validation :

Note that in certain cases, wikidata=* should be used as a suffix of another key. For example, if you want to link an OSM shop to the Wikidata object of the brand, you can use brand:wikidata=*; a statue can be tagged artist:wikidata=* and subject:wikidata=*, etc.

Scripts pour Wikidata

Several user scripts on Wikidata allow to query and render an OSM-derived map for specific items in Wikidata matching OSM elements:

  • GeoHack replacement script – replaces coordinates' external links to GeoHack with direct links to a single mapping provider (for example, OSM).
  • overpass – embeds a map displaying features tagged with the current item in OpenStreetMap. Powered by Overpass Turbo (Q62057787).
  • ClaimMaps – adds maps to "OpenStreetMap relation ID" (P402) or "geoshape" (P3896) statements
  • osm.js – adds a link to OSM in Tools section of an item page

Linking from Wikidata to OSM

  • OSM Relation IDs can be added to Wikidata records by using Property P402
  • Ways and nodes are not considered stable IDs by Wikidata because, for example, a node may be deleted and re-added as a polygon. (In practice does this happen significantly often?)
  • A Permanent ID was proposed to solve this issue.
  • Linked OSM relations can be listed with: Special:WhatLinksHere/Property:P402 or here as query.
  • Wikidata contains 105552 OSM IDs as of 31 Jan 2020.

OpenStreetMap-related properties at Wikidata

Les clés et tags OSM

For a list of OSM tags’ and keys’ equivalent items in Wikidata, see what links to Wikidata concept (12) on this wiki and what links to OpenStreetMap tag or key (P1282) on Wikidata.

See also a query to identify OSM wiki data items not yet linked to Wikidata: items that do not have wikidata concept

Utilisation des données de Wikidata

par la Wikimedia Foundation

Wikimedia Foundation projects, including each language’s Wikipedia, display maps using OSM data. If an entity in OSM has been tagged with a Wikidata ID, its outline can be highlighted on the map. At the moment, there is no POI support. Only shapes and lines can be shown this way. See w:mw:Help:Extension:Kartographer#External_data.

OSM areas (not points or lines) with wikidata tags are highlighted in infoboxes in Commons etc.

The Kartographer extension binds OSM objects to their Wikipedia article when the object has a wikidata=* tag, see for example this article map in the infobox.

If the Wikidata ID tagged on an OSM object is to a redirect then the object will not be highlighted on Wikimedia maps.

UMap

Reasonator

Reasonator, which puts a human-friendly front end on Wikidata, is now showing two links for geotagged entries, to TagInfo and Overpass turbo, querying these tags.

For example, the Reasonator page:

https://reasonator.toolforge.org/?q=Q915614

has links to:

https://taginfo.openstreetmap.org/tags/wikidata=Q915614
http://overpass-turbo.eu/?w=%22wikidata%22%3F%22Q915614%22+global&R

You’ll see them just below the map images.

Kartographer

OSM elements tagged with Wikidata item unique identifiers can be displayed in Wikipedia pages, as overlays on OSM-based maps, using the Kartographer Extension. See also Kartographer/OSM.

OSM wiki

Templates to create links to Wikidata pages:

  • {{Q}} – display a link to a Wikidata item by its unique (hopefully stable) identifier.
  • {{Property}} – display a link to a Wikidata property by its unique (hopefully stable) identifier.

Querying Wikidata and OSM

Wikidata data can be retrieved in a number of ways, one of which is SPARQL. Since OSM data can also be queried using SPARQL, Wikidata “federates” the two, allowing them to be queried jointly.

Specific OSM-based services which Wikidata federates with include:

Importer des données

Importer des données d'OSM dans Wikidata

Copying data from OSM to Wikidata (or even from other Wikimedia projects) is not allowed because Wikidata uses the public-domain style Creative Commons CC0 license which does not contain any attribution or share-alike provisions. Obviously, this does not apply to original data which you have generated yourself, for example by your own surveys.

Note Wikimedia legal team advice confirms this: For EU databases, bots or other automated ways of extracting data should also be avoided because of the Directive’s prohibition on “repeated and systematic extraction” of even insubstantial amounts of data. (from w:m:Wikilegal/Database Rights#Conclusion).

Importer des données de Wikidata dans OSM

Wikidata is using the CC0 license, which on first sight allows imports into OSM. However, OSM does not, generally, accept imports of data from Wikidata due to the sources often used to contribute to Wikidata. A significant part of Wikidata data was harvested from Wikipedia, in which for example most coordinates are produced using/copied from products with licenses conflicting with OSM.

Note that CC0 license "only extends to the material the licensor actually has rights in and specifically avoids making a statement on the status of any third party material included. For use in OpenStreetMap, the licences of all the data that is included in the dataset need to be determined and compatibility verified."[1]

For example, copying from Google Maps to OpenStreetMap (even indirectly) is not OK, and copying Wikidata coordinates (that were copied to Wikipedia from Google Maps) is also not OK. Note that Wikipedia allows and encourages to use Google Maps to obtain coordinate data[2] and other sources that are not OK to be used in OSM[3].

The same applies to any other data present in Wikidata.

Import is OK only for Wikidata content that was imported from sources compatible with OSM - what excludes for example coordinates obtained from Wikipedia.

OpenStreetMap tries to be whiter than white, and data should be legally used in any country[4]. Therefore OpenStreetMap acknowledges sui generis database right. As a conclusion, an import of information from Wikidata into OSM is generally not permitted because Wikidata has lower standards in terms of copyright than OSM. In addition, Wikidata contains some data from sources we are not allowed to use[5].

In rare situations, when it is possible to verify that data has acceptable copyright status it is possible to use part of Wikidata data.

Past activities

  • 2013-09-12: There was a proposal to automatically add Wikidata IDs to a number of OSM objects.
  • 2016-10-27: Mapbox has proposed a procedure for importing, but has yet to get community feedback on it and thus reverted in the meantime.
  • 2016-11-17: There has been a Mapbox inspired mass-edit but has also been put on hold until further community discussion.

Academic papers about OSM

Wikidata has details of academic papers about OSM. They can be seen at Scholia.

Notes and references

Voir également

Wikidata
Wikidata has a page on OpenStreetMap.