ColinMaudry / sirene-ld

Transformation du répertoire SIRENE (CSV) au format RDF pour publication en Linked Data
The Unlicense
32 stars 10 forks source link

Enrich the data with data from Wikidata #8

Open ColinMaudry opened 6 years ago

pachevalier commented 5 years ago

I would l'ile to do the opposite : enrich Wikidata with sireneld 😀.

It would be interesting to add "forme juridique" and "siege social" from sireneld.

Here is a Wikidata query : https://query.wikidata.org/#SELECT%20%3Fitem%20%3Fsiren%20%3Fforme_juridique%20%3Fforme_juridiqueLabel%20%3Fsi_ge%20%3Fsi_geLabel%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%3Fitem%20wdt%3AP1616%20%3Fsiren.%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP1454%20%3Fforme_juridique.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fitem%20wdt%3AP159%20%3Fsi_ge.%20%7D%0A%7D%0ALIMIT%20100

I don't know how to run a federated query.

ColinMaudry commented 5 years ago

Tu peux exĂ©cuter cette requĂȘte sur queery.link en mettant https://triplestore.sireneld.io/sirene/sparql dans SPARQL endpoint URL.

La fonction de requĂȘte bug par contre, mais au moins tu peux tester.

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX sirext: <https://sireneld.io/vocab/sirext#>
PREFIX sirene: <https://sireneld.io/vocab/sirene#>
SELECT ?s ?item ?siren ?forme_juridique  
WHERE {
      service <https://query.wikidata.org/sparql> {
  ?item wdt:P1616 ?siren.
  }
    # Pattern de requĂȘte cĂŽtĂ© sireneLD
    ?s  a sirext:UniteLegale ;
      sirene:categorieJuridiqueUniteLegale ?forme_juridique ;
      sirene:siren ?siren .

  #SERVICE wikibase:label { 
  #  bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
  #}
}
LIMIT 10