Help

Difference between revisions of "SPARQL (HAL)"

(Created page with "=== ✅ HAL Authors → birthdate === {| style="width:100%" |- style="vertical-align:top;" |style="padding: 0 3em;width:60%"| <syntaxhighlight lang="sparql"> #defaultEndpoint...")
 
 
(60 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== ✅ HAL Authors → birthdate ===
+
== Éléments notables ==
 +
 
 +
=== Propriétés notables : HAL ===
 +
{| class="wikitable"
 +
! ItemLabel || WD Qid || sur WD || sur HAL
 +
|-
 +
|-
 +
| HAL || Q3144107 || -- || --
 +
|-
 +
| HAL author ID || `P4450` || 1,816 || 127,727?
 +
|-
 +
| HAL structure ID || `P6773` || 5,950 || 35,992
 +
|-
 +
| HAL article ID || `P7864` || 716 || 1,199,139
 +
|-
 +
| HAL journal ID || `P8903` || 29,733 || 113,000+?
 +
|}
 +
* Manque de réconciliation
 +
 
 +
=== Propriétés notables : Articles `P7864` ===
 +
{| class="wikitable"
 +
! ItemLabel || WD Qid
 +
|-
 +
|-
 +
| title || `P1476`
 +
|-
 +
| author / author name string || `P50` / `P2093`
 +
|-
 +
| publication date || `P577`
 +
|-
 +
| published in || `P14233`
 +
|-
 +
| volume || `P478`
 +
|-
 +
| issue || `P433`
 +
|-
 +
| page(s) || `P304`
 +
|-
 +
| main subject || `P921`
 +
|}
 +
 
 +
=== Propriétés notables : Revues `P8903` ===
 +
{| class="wikitable"
 +
! ItemLabel || WD Qid
 +
|-
 +
| inception || `P571`
 +
|-
 +
| title || `P1476`
 +
|-
 +
| main subject || `P921`
 +
|-
 +
| country of origin || `P495`
 +
|}
 +
 
 +
=== Propriétés notables : Auteurs `P4450` ===
 +
{| class="wikitable"
 +
! ItemLabel || WD Qid
 +
|-
 +
|-
 +
| sex or gender || `P21`
 +
|-
 +
| date of birth || `P569`
 +
|-
 +
| place of birth || `P19`
 +
|-
 +
| country of citizenship || `P27`
 +
|-
 +
| given name || `P735`
 +
|-
 +
| doctoral advisor || `P184`
 +
|-
 +
| doctoral student || `P185`
 +
|-
 +
| occupation || P106
 +
|}
 +
 
 +
=== Propriétés notables : Structures `P6773` ===
 +
{| class="wikitable"
 +
! ItemLabel || WD Qid
 +
|-
 +
| inception || `P571`
 +
|-
 +
| title || `P1476`
 +
|-
 +
| main subject || `P921`
 +
|-
 +
| country || `P17`
 +
|-
 +
| coordinate location || `P625`
 +
|-
 +
| parent organization || `P749`
 +
|-
 +
| official website || `P856`
 +
|-
 +
| ROR ID || `P6782`
 +
|}
 +
 
 +
== ✅ HAL Authors ==
 +
=== ✅ Number of people in Wikidata with HAL Authors ID ([[:d:Property:P4450|P4450]]) ===
 +
 
 
{| style="width:100%"  
 
{| style="width:100%"  
 
|- style="vertical-align:top;"
 
|- style="vertical-align:top;"
|style="padding: 0 3em;width:60%"|
+
|style="padding: 0 3em;width:40%;"|
 
<syntaxhighlight lang="sparql">
 
<syntaxhighlight lang="sparql">
 
#defaultEndpoint:Wikidata
 
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Authors_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P4450 ?halIdValue.
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Authors_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P4450 ?halIdValue.
 +
}
 +
</query>
 +
|}
 +
 +
 +
=== ✅ HAL Authors on Wikidata → birthdate ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue ?genderLabel (YEAR(?birthDate) AS ?birthYear)
 +
WHERE {
 +
  ?item wdt:P31 wd:Q5.                      # is human (Q5)
 +
  ?item wdt:P4450 ?halIdValue.              # HAL author ID `P4450` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P569 ?birthDate. }    # birthDate `P569` in ?birthDate
 +
  # MINUS { ?item wdt:P569 ?birthDate. }
 +
  OPTIONAL { ?item wdt:P21 ?gender. }        # gender `P21` in ?gender
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?birthYear)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10">
 
#defaultEndpoint:Wikidata
 
#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue ?birthDate (YEAR(?birthDate) AS ?birthYear)
+
SELECT ?item ?itemLabel ?halIdValue ?genderLabel (YEAR(?birthDate) AS ?birthYear)
 
WHERE {
 
WHERE {
   ?item wdt:P31 wd:Q5;
+
   ?item wdt:P31 wd:Q5.                      # has HAL author ID `P4450`
    p:P4450 ?statement.
+
   ?item wdt:P4450 ?halIdValue.               # HAL author ID `P4450` in ?halIdValue
   OPTIONAL { ?statement ps:P4450 ?halIdValue. }
+
   OPTIONAL { ?item wdt:P569 ?birthDate. }   # birthDate `P569` in ?birthDate
   OPTIONAL { ?item wdt:P569 ?birthDate. }
 
 
   # MINUS { ?item wdt:P569 ?birthDate. }
 
   # MINUS { ?item wdt:P569 ?birthDate. }
 +
  OPTIONAL { ?item wdt:P21 ?gender. }        # gender `P21` in ?gender
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?birthYear)
 +
</query>
 +
|}
 +
 +
=== ✅ HAL Authors on Wikidata → Authors cv, publications ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item
 +
?itemLabel
 +
(ENCODE_FOR_URI(?itemLabel) AS ?uriLabel)  # Wikipedia title
 +
?halIdValue
 +
(CONCAT("https://cv.hal.science/", STR(?halIdValue)) AS ?halAuthorCv)  #
 +
(CONCAT("<a href=https://hal.science/search/index/q/*/authIdHal_s/", STR(?halIdValue),">link</a>") AS ?halAuthorPublications)
 +
(CONCAT("https://api.archives-ouvertes.fr/search/?q=authIdHal_s:", STR(?halIdValue),'&wt=json') AS ?halAuthorPublicationsAPI)
 +
WHERE {
 +
  ?item wdt:P31 wd:Q5.                      # has HAL author ID `P4450`
 +
  ?item wdt:P4450 ?halIdValue.              # HAL author ID `P4450` in ?halIdValue
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?itemLabel)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item
 +
?itemLabel
 +
(ENCODE_FOR_URI(?itemLabel) AS ?uriLabel)  # Wikipedia title
 +
?halIdValue
 +
(CONCAT("https://cv.hal.science/", STR(?halIdValue)) AS ?halAuthorCv)  #
 +
(CONCAT("<a href=https://hal.science/search/index/q/*/authIdHal_s/", STR(?halIdValue),">link:",?halIdValue,"</a>") AS ?halAuthorPublications)
 +
(CONCAT("https://api.archives-ouvertes.fr/search/?q=authIdHal_s:", STR(?halIdValue),'&wt=json') AS ?halAuthorPublicationsAPI)
 +
WHERE {
 +
  ?item wdt:P31 wd:Q5.                      # has HAL author ID `P4450`
 +
  ?item wdt:P4450 ?halIdValue.              # HAL author ID `P4450` in ?halIdValue
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?itemLabel)
 +
</query>
 +
|}
 +
 +
=== ✅ HAL Authors on Wikidata → Authors per gender ([[Property:P21|P21]]) ===
 +
1814 authors HAL author ID with in wikipedia
 +
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT
 +
?genderLabel (count(?item) AS ?nb)          # counting gender
 +
WHERE {
 +
  ?item wdt:P31 wd:Q5;                      # is instance of P31 human `Q5`
 +
        wdt:P4450 ?halIdValue.              # HAL author ID `P4450` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P21 ?gender. }        # gender `P21` in ?gender
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?genderLabel
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT
 +
?genderLabel (count(?item) AS ?nb)          # counting gender
 +
WHERE {
 +
  ?item wdt:P31 wd:Q5;                      # has HAL author ID `P4450`
 +
        wdt:P4450 ?halIdValue.              # HAL author ID `P4450` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P21 ?gender. }        # gender `P21` in ?gender
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?genderLabel
 +
</query>
 +
|}
 +
 +
== ✅ HAL Articles ==
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?value
 +
{
 +
  ?item wdt:P7864 ?dbvalue.
 +
  BIND(IF(wikibase:isSomeValue(?dbvalue), "", ?dbvalue) AS ?value)
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?value
 +
{
 +
  ?item wdt:P7864 ?dbvalue.
 +
  BIND(IF(wikibase:isSomeValue(?dbvalue), "", ?dbvalue) AS ?value)
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
 +
}
 +
</query>
 +
|}
 +
 +
=== ✅ Number of items in Wikidata with `HAL article ID` property ([[:d:Property:P7864|P7864 ]]) ===
 +
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Article_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P7864 ?halIdValue.
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Article_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P7864  ?halIdValue.
 +
}
 +
</query>
 +
|}
 +
 +
=== ✅ Number of items in Wikidata with `HAL Article ID` property ([[:d:Property:P7864|P7864]]) but no creation date ([[:d:Property:P571|P571]]) ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Article_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P7864 ?halIdValue.
 +
  MINUS { ?item wdt:P571 ?creationDate. }
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Article_Jounal_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P7864 ?halIdValue.
 +
  MINUS { ?item wdt:P571 ?creationDate. }
 +
}
 +
</query>
 +
|}
 +
 +
=== ✅ HAL Article → creation date (inception) ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue
 +
(YEAR(?publicationDate) AS ?publicationYear)
 +
?publishedIn ?pages
 +
(GROUP_CONCAT(?authorLabel1 ; separator=" | ") as ?authorsList)
 +
WHERE {
 +
  ?item wdt:P7864 ?halIdValue .
 +
  OPTIONAL { ?item wdt:P1476 ?title }          # title `P1476`
 +
  OPTIONAL { ?item wdt:P577 ?publicationDate } # publication date `P577`
 +
  OPTIONAL { ?item wdt:P14233 ?publishedIn }  # published in `P14233`
 +
  OPTIONAL { ?item wdt:P304 ?pages }          # pages `P304`
 +
  OPTIONAL { ?item wdt:P2093 ?author }          # author `P50`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
 
 +
  BIND(CONCAT(UCASE(SUBSTR(?author, 1 , 1 )), SUBSTR(?author, 2 )) AS ?authorLabel1)
 +
}
 +
GROUP BY ?item ?itemLabel ?halIdValue ?publicationDate ?publishedIn ?pages
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10">#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue
 +
(YEAR(?publicationDate) AS ?publicationYear)
 +
?publishedIn ?pages
 +
(GROUP_CONCAT(?authorLabel1 ; separator=" | ") as ?authorsList)
 +
WHERE {
 +
  ?item wdt:P7864 ?halIdValue .
 +
  OPTIONAL { ?item wdt:P1476 ?title }          # title `P1476`
 +
  OPTIONAL { ?item wdt:P577 ?publicationDate } # publication date `P577`
 +
  OPTIONAL { ?item wdt:P14233 ?publishedIn }  # published in `P14233`
 +
  OPTIONAL { ?item wdt:P304 ?pages }          # pages `P304`
 +
  OPTIONAL { ?item wdt:P2093 ?author }          # author `P50`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
 
 +
  BIND(CONCAT(UCASE(SUBSTR(?author, 1 , 1 )), SUBSTR(?author, 2 )) AS ?authorLabel1)
 +
}
 +
GROUP BY ?item ?itemLabel ?halIdValue ?publicationDate ?publishedIn ?pages
 +
</query>
 +
|}
 +
 +
== ✅ HAL Journals ==
 +
=== ✅ Number of items in Wikidata with `HAL journal ID` property ([[:d:Property:P8903|P8903]]) ===
 +
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Jounal_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Jounal_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.
 +
}
 +
</query>
 +
|}
 +
 +
=== ✅ Number of items in Wikidata with `HAL journal ID` property([[:d:Property:P48903|P48903]]) but no creation date ([[:d:Property:P571|P571]]) ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Jounal_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.
 +
  MINUS { ?item wdt:P571 ?creationDate. }
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Jounal_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.
 +
  MINUS { ?item wdt:P571 ?creationDate. }
 +
}
 +
</query>
 +
|}
 +
 +
=== ✅ HAL Journal → creation date (inception) ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue (YEAR(?creationDate) AS ?creationYear)
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.
 +
  OPTIONAL { ?item wdt:P571 ?creationDate. }
 +
  # MINUS { ?item wdt:P571 ?creationDate. }
 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 
}
 
}
 +
ORDER BY DESC (?creationYear)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
||
 
||
<query _pagination="5">
+
<query _pagination="10">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue (YEAR(?creationDate) AS ?creationYear)
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.
 +
  OPTIONAL { ?item wdt:P571 ?creationDate. }
 +
  # MINUS { ?item wdt:P571 ?creationDate. }
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?creationYear)
 +
</query>
 +
|}
 +
 
 +
=== 🇶 HAL Journal on Wikidata per country ([[:d:Property:P495|P495]]) ===
 +
 
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT
 +
?countryLabel (count(?item) AS ?nb)          # counting occurence per country
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.              # HAL journal ID `P8903` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P495 ?country }      # country of origin `P495`
 +
  # OPTIONAL { ?item wdt:P921 ?topic }      # main subject `P921`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?countryLabel
 +
ORDER BY DESCC (?nb)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT
 +
?countryLabel (count(?item) AS ?nb)          # counting occurence per country
 +
WHERE {
 +
  ?item wdt:P8903 ?halIdValue.              # HAL journal ID `P8903` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P495 ?country }      # country of origin `P495`
 +
  # OPTIONAL { ?item wdt:P921 ?topic }      # main subject `P921`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?countryLabel
 +
ORDER BY DESC (?nb)
 +
</query>
 +
|}
 +
 
 +
== ✅ HAL Structures ==
 +
=== ✅ Number of items in Wikidata with `HAL structure ID` property ([[:d:Property:P6773|P6773]]) ===
 +
 
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Structure_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Structure_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.
 +
}
 +
</query>
 +
|}
 +
 
 +
=== ✅ Number of items in Wikidata with `HAL structure ID` property([[:d:Property:P6773|P6773]]) but no creation date ([[:d:Property:P571|P571]]) ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Structure_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.
 +
  MINUS { ?item wdt:P571 ?creationDate. }
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Wikidata
 +
SELECT (COUNT(?item) AS ?number_Of_Hal_Structure_ID_In_Wikidata)
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.
 +
  MINUS { ?item wdt:P571 ?creationDate. }
 +
}
 +
</query>
 +
|}
 +
 
 +
=== ✅ HAL Structure → creation date (inception P571) and country (P17) ===
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue (YEAR(?creationDate) AS ?creationYear) ?countryLabel
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.
 +
  OPTIONAL { ?item wdt:P571 ?creationDate. }
 +
  OPTIONAL { ?item wdt:P17 ?country }      # country `P17`
 +
  # MINUS { ?item wdt:P571 ?creationDate. }
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?countryLabel)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10">
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?itemLabel ?halIdValue (YEAR(?creationDate) AS ?creationYear) ?countryLabel
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.
 +
  OPTIONAL { ?item wdt:P571 ?creationDate. }
 +
  OPTIONAL { ?item wdt:P17 ?country }      # country `P17`
 +
  # MINUS { ?item wdt:P571 ?creationDate. }
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
ORDER BY DESC (?countryLabel)
 +
</query>
 +
|}
 +
 
 +
=== 🇶 HAL Structures on Wikidata per country of origin ([[:d:Property:P495|P495]]) ===
 +
5942 structures HAL author ID with in Wikidata
 +
 
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
SELECT
 +
?countryLabel (count(?item) AS ?nb)          # counting occurence per country
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.              # HAL structure ID `P6773` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P495 ?country }      # country of origin `P495`
 +
  # OPTIONAL { ?item wdt:P921 ?topic }      # main subject `P921`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?countryLabel
 +
ORDER BY DESCC (?nb)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10" >
 +
#defaultEndpoint:Wikidata
 +
SELECT
 +
?countryLabel (count(?item) AS ?nb)          # counting occurence per country
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.              # HAL structure ID `P6773` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P495 ?country }      # country of origin `P495`
 +
  # OPTIONAL { ?item wdt:P921 ?topic }      # main subject `P921`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?countryLabel
 +
ORDER BY DESC (?nb)
 +
</query>
 +
|}
 +
 
 +
=== 🇶 HAL Structures on Wikidata per country ([[:d:Property:P17|P17]]) ===
 +
5942 structures HAL author ID with in Wikidata
 +
 
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 
#defaultEndpoint:Wikidata
 
#defaultEndpoint:Wikidata
 +
SELECT
 +
?countryLabel (count(?item) AS ?nb)          # counting occurence per country
 +
WHERE {
 +
  ?item wdt:P6773 ?halIdValue.              # HAL structure ID `P6773` in ?halIdValue
 +
  OPTIONAL { ?item wdt:P17 ?country }        # country `P17`
 +
  # OPTIONAL { ?item wdt:P921 ?topic }      # main subject `P921`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?countryLabel
 +
ORDER BY DESC (?nb)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10" >
 
#defaultEndpoint:Wikidata
 
#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue ?birthDate (YEAR(?birthDate) AS ?birthYear)
+
SELECT  
 +
?countryLabel (count(?item) AS ?nb)           # counting occurence per country
 
WHERE {
 
WHERE {
   ?item wdt:P31 wd:Q5;
+
  ?item wdt:P6773 ?halIdValue.              # HAL structure ID `P6773` in ?halIdValue
    p:P4450 ?statement.
+
  OPTIONAL { ?item wdt:P17 ?country }        # country `P17`
   OPTIONAL { ?statement ps:P4450 ?halIdValue. }
+
  # OPTIONAL { ?item wdt:P921 ?topic }      # main subject `P921`
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
}
 +
GROUP BY ?countryLabel
 +
ORDER BY DESC (?nb)
 +
</query>
 +
|}
 +
 
 +
=== Structures on Wikidata -> authors -> with HAL author id ===
 +
5942 structures HAL author ID with in Wikidata
 +
 
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Wikidata
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?halIdValue ?genderLabel (YEAR(?birthDate) AS ?birthYear) WHERE {
 +
  VALUES ?structure {
 +
    # wd:Q1194988 # Paris 8
 +
    # wd:Q13531686 # Paris Saclays
 +
    wd:Q20669873 # University of Toulouse
 +
        wd:Q1933558  # University Toulouse - Jean Jaurès
 +
        wd:Q1273188  # Toulouse III University - Paul-Sabatier
 +
        wd:Q51784003 # Toulouse Mirail
 +
    wd:Q64716811 # PRES University of Toulouse
 +
  }
 +
   ?item wdt:P31 wd:Q5 ;
 +
        wdt:P108 ?structure .
 +
   OPTIONAL { ?item wdt:P4450 ?halIdValue } # halIdValue -> 64
 
   OPTIONAL { ?item wdt:P569 ?birthDate. }
 
   OPTIONAL { ?item wdt:P569 ?birthDate. }
   # MINUS { ?item wdt:P569 ?birthDate. }
+
   OPTIONAL { ?item wdt:P21 ?gender. }
 +
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
  }
 +
ORDER BY DESC (?birthYear)
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10" >
 +
#defaultEndpoint:Wikidata
 +
SELECT ?item ?halIdValue ?genderLabel (YEAR(?birthDate) AS ?birthYear) WHERE {
 +
  VALUES ?structure {
 +
    # wd:Q1194988 # Paris 8
 +
    # wd:Q13531686 # Paris Saclays
 +
    wd:Q20669873 # University of Toulouse
 +
        wd:Q1933558  # University Toulouse - Jean Jaurès
 +
        wd:Q1273188  # Toulouse III University - Paul-Sabatier
 +
        wd:Q51784003 # Toulouse Mirail
 +
    wd:Q64716811 # PRES University of Toulouse
 +
  }
 +
  ?item wdt:P31 wd:Q5 ;
 +
        wdt:P108 ?structure .
 +
  OPTIONAL { ?item wdt:P4450 ?halIdValue } # halIdValue -> 64
 +
  OPTIONAL { ?item wdt:P569 ?birthDate. }
 +
  OPTIONAL { ?item wdt:P21 ?gender. }
 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 +
  }
 +
ORDER BY DESC (?birthYear)
 +
</query>
 +
|}
 +
 +
== Work to come ==
 +
<!--
 +
 +
=== 🇶 Author name(s) → Author Qid(s) ===
 +
''This query is going to be DEPRECATED as the queried data will no longer be available.''
 +
<!-- REVIEW REQUIRED -- >
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?speakerName ?speakerId
 +
WHERE {
 +
  VALUES ?speakerName { "Yug" "VIGNERON" } # Assign value: one or multiple values
 +
  # note: need to comment BIND
 +
  BIND ( STRLANG(?speakerName, "en") AS ?speakerLabel )
 +
  # Grammatical note: ';' allows to chain actions
 +
  ?speakerId prop:P2 entity:Q3 ;        # Filter: P2 'instance of' is Q3 'speaker'.
 +
            rdfs:label ?speakerLabel . # Filter by value: label equal ?speakerLabel's value
 +
}
 +
</syntaxhighlight>
 +
||
 +
 +
<query _pagination="5">
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?speakerName ?speakerId
 +
WHERE {
 +
  VALUES ?speakerName { "Yug" "VIGNERON" }
 +
  BIND ( STRLANG(?speakerName, "en") AS ?speakerLabel )
 +
  ?speakerId prop:P2 entity:Q3 ;
 +
            rdfs:label ?speakerLabel .
 +
}
 +
</query>
 +
|}
 +
 +
=== 🇶 Speaker Qid ([[Q445757]]) → Speaker data, all ===
 +
''This query is going to be DEPRECATED as the queried data will no longer be available.''
 +
<!-- Q: alternative words for "predicate" and "object". "property" and "value" ?-- >
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Lingualibre
 +
# Get Q445757 (User:SangeetaRH‎)'s data
 +
SELECT ?anyProperty ?anyValue ?anyValueLabel
 +
WHERE {
 +
  entity:Q445757 ?anyProperty ?anyValue .  # Filter: of Q445757 'SangeetaRH‎', get any property and any values
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 
}
 
}
 +
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="10" >
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?anyProperty ?anyValue ?anyValueLabel
 +
WHERE {
 +
  entity:Q445757 ?anyProperty ?anyValue .  # Filter: of Q445757 'SangeetaRH‎', get any property and any values
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
}
 +
</query>
 +
|}
 +
 +
=== 🇶 Speaker Qid ([[Q445757]]) → Speaker languages ([[Property:P4|P4]]) ===
 +
''This query is going to be DEPRECATED as the queried data will no longer be available.''
 +
<!-- Q: Add languages iso P:13 -- >
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?languages ?languagesLabel
 +
WHERE {
 +
  entity:Q445757 prop:P4 ?languages . # Assign value: for Q445757 'SangeetaRH‎', P4 'language' into ?languages
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?languages ?languagesLabel
 +
WHERE {
 +
  entity:Q445757 prop:P4 ?languages . # Assign value: for Q445757 'SangeetaRH‎', P4 'language' into ?languages
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
}
 +
</query>
 +
|}
 +
 +
=== Speaker Qid (speakers/1 ???) + Language LL Qid ([[d:Q1571]]) → List records ===
 +
''This query is IN WORK for Commons SPARQL Endpoint. One Wikidata property is missing; please update this query with the right property URI.''
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Commons
 +
SELECT ?audio ?audioLabel
 +
WHERE {
 +
  ?audio wdt:SPEAKER_PROPERTY_MISSING <http://lingualibre.org/speakers/1> ; # Filter: ??? 'speaker' P5 Speaker is User:SangeetaRH
 +
        wdt:P407 wd:Q1571 .  # Filter: P407 'language' is Q1571 'Marathi'
 +
 
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
}
 +
</syntaxhighlight>
 +
||
 +
<query _pagination="5" >
 +
#defaultEndpoint:Commons
 +
SELECT ?audio ?audioLabel
 +
WHERE {
 +
  ?audio wdt:SPEAKER_PROPERTY_MISSING <http://lingualibre.org/speakers/1> ; # Filter: ??? 'speaker' P5 Speaker is User:SangeetaRH
 +
        wdt:P407 wd:Q1571 .  # Filter: P407 'language' is Q1571 'Marathi'
 +
 
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
}
 +
</query>
 +
|}
 +
 +
=== Speaker Qid (speakers/1 ???) + Language LL Qid ([[d:Q1571]]) → Count records ===
 +
''This query is IN WORK for Commons SPARQL Endpoint. One Wikidata property is missing; please update this query with the right property URI.''
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Commons
 +
SELECT ?language ?speaker (COUNT(?audio) AS ?audio)
 +
WHERE {
 +
  # Comment out the below pattern to filter by language, e.g. Q1571 or others
 +
  # VALUES ?language { wd:Q1571 }  # Bind value: Q1571 'Marathi' into ?language
 +
  VALUES ?speaker { <http://lingualibre.org/speakers/1> }  # Assign value: ll.org/speakers/1 (for 'SangeetaRH') into ?speaker
 +
 
 +
  ?audio wdt:SPEAKER_PROPERTY_MISSING ?speaker ; # Filter: ??? 'speaker' is ?speaker
 +
        wdt:P407 ?language ;                    # Filter: P407 'language' bound to ?language
 +
        wdt:P31 wd:Q108167708 .                # Filter: P31 'instance of' is Q108167708 'pronunciation file'
 +
}
 +
GROUP BY ?language ?speaker  # Sorting first groups per language and speaker
 +
</syntaxhighlight>
 +
|
 +
<query _pagination="6" item="Property" itemLabel="Values">
 +
#defaultEndpoint:Commons
 +
SELECT ?language ?speaker (COUNT(?audio) AS ?audio)
 +
WHERE {
 +
  # Comment out the below pattern to filter by language.
 +
  # E.g. Q1571 or others
 +
 
 +
  # VALUES ?language { wd:Q1571 }  # Bind value: Q1571 'Marathi' into ?language
 +
  VALUES ?speaker { <http://lingualibre.org/speakers/1> }  # Assign value: ll.org/speakers/1 (for 'SangeetaRH') into ?speaker
 +
 
 +
  ?audio wdt:SPEAKER_PROPERTY_MISSING ?speaker ; # Filter: ??? 'speaker' is ?speaker
 +
        wdt:P407 ?language ;                    # Filter: P407 'language' bound to ?language
 +
        wdt:P31 wd:Q108167708 .                # Filter: P31 'instance of' is Q108167708 'pronunciation file'
 +
}
 +
GROUP BY ?language ?speaker  # Sorting first groups per language and speaker
 +
</query>
 +
|}
 +
 +
=== Is Speaker ([[Q3]]) → List of accounts and associated speakers ===
 +
''This query is going to be DEPRECATED as the queried data will no longer be available.''
 +
{| style="width:100%"
 +
|- style="vertical-align:top;"
 +
|style="padding: 0 3em;width:40%;"|
 +
<syntaxhighlight lang="sparql">
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?linkedUser ?speakerLabel (SUBSTR(STR(?speaker),32) AS ?speakerQid)
 +
WHERE {
 +
  ?speaker prop:P2 entity:Q3 .  # Filter: P2 'instance of' is Q3 'speaker'.
 +
  ?speaker prop:P11 ?linkedUser . # Assign value: P11 'linked users' into ?linkedUser.
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
} ORDER BY DESC (?speakerLabel)
 +
</syntaxhighlight>
 +
|
 +
<query _pagination="6" item="Property" itemLabel="Values">
 +
#defaultEndpoint:Lingualibre
 +
SELECT ?linkedUser ?speakerLabel (SUBSTR(STR(?speaker),32) AS ?speakerQid)
 +
WHERE {
 +
  ?speaker prop:P2 entity:Q3 .  # Filter: P2 'instance of' is Q3 'speaker'.
 +
  ?speaker prop:P11 ?linkedUser . # Assign value: P11 'linked users' into ?linkedUser.
 +
  # Add labels
 +
  SERVICE wikibase:label {
 +
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
 +
  }
 +
} ORDER BY DESC (?speakerLabel)
 
</query>
 
</query>
 
|}
 
|}
 +
-->
 +
== See also ==
 +
Help page:
 +
* https://lingualibre.org/wiki/Help:SPARQL_(HAL)
 +
 +
HAL SPARQL
 +
* https://data.hal.science/doc/sparql HAL SPARQL documentation
 +
* http://sparql.archives-ouvertes.fr/sparql? HAL endpoint
 +
* http://sparql.archives-ouvertes.fr/sparql HAL Query Service
 +
 +
HAL API:
 +
* https://api.archives-ouvertes.fr/docs/search/?schema=field-types#field-types API reference
 +
 +
Wikidata SPARQL
 +
* https://query.wikidata.org Wikidata Query Service
 +
* https://query.wikidata.org/sparql? Wikidata endpoint
 +
 +
Federation request:
 +
* [[:phab:T339832]]
 +
 +
Wiki HAL
 +
* https://wiki.ccsd.cnrs.fr/wikis/hal/index.php/Accueil
 +
* https://aurehal.archives-ouvertes.fr
 +
* https://ocdhal.univ-grenoble-alpes.fr
 +
 +
{{technicals}}

Latest revision as of 14:53, 11 December 2023

Éléments notables

Propriétés notables : HAL

ItemLabel WD Qid sur WD sur HAL
HAL Q3144107 -- --
HAL author ID `P4450` 1,816 127,727?
HAL structure ID `P6773` 5,950 35,992
HAL article ID `P7864` 716 1,199,139
HAL journal ID `P8903` 29,733 113,000+?
  • Manque de réconciliation

Propriétés notables : Articles `P7864`

ItemLabel WD Qid
title `P1476`
author / author name string `P50` / `P2093`
publication date `P577`
published in `P14233`
volume `P478`
issue `P433`
page(s) `P304`
main subject `P921`

Propriétés notables : Revues `P8903`

ItemLabel WD Qid
inception `P571`
title `P1476`
main subject `P921`
country of origin `P495`

Propriétés notables : Auteurs `P4450`

ItemLabel WD Qid
sex or gender `P21`
date of birth `P569`
place of birth `P19`
country of citizenship `P27`
given name `P735`
doctoral advisor `P184`
doctoral student `P185`
occupation P106

Propriétés notables : Structures `P6773`

ItemLabel WD Qid
inception `P571`
title `P1476`
main subject `P921`
country `P17`
coordinate location `P625`
parent organization `P749`
official website `P856`
ROR ID `P6782`

✅ HAL Authors

✅ Number of people in Wikidata with HAL Authors ID (P4450)

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Authors_In_Wikidata)
WHERE {
  ?item wdt:P4450 ?halIdValue. 
}
... Loading ...


✅ HAL Authors on Wikidata → birthdate

#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue ?genderLabel (YEAR(?birthDate) AS ?birthYear)
WHERE {
  ?item wdt:P31 wd:Q5.                       # is human (Q5)
  ?item wdt:P4450 ?halIdValue.               # HAL author ID `P4450` in ?halIdValue
  OPTIONAL { ?item wdt:P569 ?birthDate. }    # birthDate `P569` in ?birthDate
  # MINUS { ?item wdt:P569 ?birthDate. }
  OPTIONAL { ?item wdt:P21 ?gender. }        # gender `P21` in ?gender
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?birthYear)
... Loading ...

✅ HAL Authors on Wikidata → Authors cv, publications

#defaultEndpoint:Wikidata
SELECT ?item
?itemLabel 
 (ENCODE_FOR_URI(?itemLabel) AS ?uriLabel)  # Wikipedia title
?halIdValue
 (CONCAT("https://cv.hal.science/", STR(?halIdValue)) AS ?halAuthorCv)  #
 (CONCAT("<a href=https://hal.science/search/index/q/*/authIdHal_s/", STR(?halIdValue),">link</a>") AS ?halAuthorPublications)
 (CONCAT("https://api.archives-ouvertes.fr/search/?q=authIdHal_s:", STR(?halIdValue),'&wt=json') AS ?halAuthorPublicationsAPI)
WHERE {
  ?item wdt:P31 wd:Q5.                       # has HAL author ID `P4450`
  ?item wdt:P4450 ?halIdValue.               # HAL author ID `P4450` in ?halIdValue
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?itemLabel)
... Loading ...

✅ HAL Authors on Wikidata → Authors per gender (P21)

1814 authors HAL author ID with in wikipedia

#defaultEndpoint:Wikidata
SELECT 
?genderLabel (count(?item) AS ?nb)           # counting gender
WHERE {
  ?item wdt:P31 wd:Q5;                       # is instance of P31 human `Q5`
        wdt:P4450 ?halIdValue.               # HAL author ID `P4450` in ?halIdValue
  OPTIONAL { ?item wdt:P21 ?gender. }        # gender `P21` in ?gender
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?genderLabel
... Loading ...

✅ HAL Articles

#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?value
{
  ?item wdt:P7864 ?dbvalue.
  BIND(IF(wikibase:isSomeValue(?dbvalue), "", ?dbvalue) AS ?value)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
... Loading ...

✅ Number of items in Wikidata with `HAL article ID` property (P7864 )

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Article_ID_In_Wikidata)
WHERE {
  ?item wdt:P7864 ?halIdValue. 
}
... Loading ...

✅ Number of items in Wikidata with `HAL Article ID` property (P7864) but no creation date (P571)

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Article_ID_In_Wikidata)
WHERE {
  ?item wdt:P7864 ?halIdValue. 
  MINUS { ?item wdt:P571 ?creationDate. }
}
... Loading ...

✅ HAL Article → creation date (inception)

#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue
(YEAR(?publicationDate) AS ?publicationYear) 
?publishedIn ?pages
(GROUP_CONCAT(?authorLabel1 ; separator=" | ") as ?authorsList)
WHERE {
  ?item wdt:P7864 ?halIdValue .
  OPTIONAL { ?item wdt:P1476 ?title }          # title `P1476`
  OPTIONAL { ?item wdt:P577 ?publicationDate } # publication date `P577`
  OPTIONAL { ?item wdt:P14233 ?publishedIn }   # published in `P14233`
  OPTIONAL { ?item wdt:P304 ?pages }           # pages `P304`
  OPTIONAL { ?item wdt:P2093 ?author }           # author `P50`
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  
  BIND(CONCAT(UCASE(SUBSTR(?author, 1 , 1 )), SUBSTR(?author, 2 )) AS ?authorLabel1)
}
GROUP BY ?item ?itemLabel ?halIdValue ?publicationDate ?publishedIn ?pages
... Loading ...

✅ HAL Journals

✅ Number of items in Wikidata with `HAL journal ID` property (P8903)

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Jounal_ID_In_Wikidata)
WHERE {
  ?item wdt:P8903 ?halIdValue. 
}
... Loading ...

✅ Number of items in Wikidata with `HAL journal ID` property(P48903) but no creation date (P571)

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Jounal_ID_In_Wikidata)
WHERE {
  ?item wdt:P8903 ?halIdValue. 
  MINUS { ?item wdt:P571 ?creationDate. }
}
... Loading ...

✅ HAL Journal → creation date (inception)

#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue (YEAR(?creationDate) AS ?creationYear)
WHERE {
  ?item wdt:P8903 ?halIdValue.
  OPTIONAL { ?item wdt:P571 ?creationDate. }
  # MINUS { ?item wdt:P571 ?creationDate. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?creationYear)
... Loading ...

🇶 HAL Journal on Wikidata per country (P495)

#defaultEndpoint:Wikidata
SELECT 
?countryLabel (count(?item) AS ?nb)           # counting occurence per country
WHERE {
  ?item wdt:P8903 ?halIdValue.               # HAL journal ID `P8903` in ?halIdValue
  OPTIONAL { ?item wdt:P495 ?country }       # country of origin `P495`
  # OPTIONAL { ?item wdt:P921 ?topic }       # main subject `P921` 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?countryLabel
ORDER BY DESCC (?nb)
... Loading ...

✅ HAL Structures

✅ Number of items in Wikidata with `HAL structure ID` property (P6773)

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Structure_ID_In_Wikidata)
WHERE {
  ?item wdt:P6773 ?halIdValue. 
}
... Loading ...

✅ Number of items in Wikidata with `HAL structure ID` property(P6773) but no creation date (P571)

#defaultEndpoint:Wikidata
SELECT (COUNT(?item) AS ?number_Of_Hal_Structure_ID_In_Wikidata)
WHERE {
  ?item wdt:P6773 ?halIdValue. 
  MINUS { ?item wdt:P571 ?creationDate. }
}
... Loading ...

✅ HAL Structure → creation date (inception P571) and country (P17)

#defaultEndpoint:Wikidata
SELECT ?item ?itemLabel ?halIdValue (YEAR(?creationDate) AS ?creationYear) ?countryLabel
WHERE {
  ?item wdt:P6773 ?halIdValue.
  OPTIONAL { ?item wdt:P571 ?creationDate. }
  OPTIONAL { ?item wdt:P17 ?country }       # country `P17`
  # MINUS { ?item wdt:P571 ?creationDate. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?countryLabel)
... Loading ...

🇶 HAL Structures on Wikidata per country of origin (P495)

5942 structures HAL author ID with in Wikidata

#defaultEndpoint:Wikidata
SELECT 
?countryLabel (count(?item) AS ?nb)           # counting occurence per country
WHERE {
  ?item wdt:P6773 ?halIdValue.               # HAL structure ID `P6773` in ?halIdValue
  OPTIONAL { ?item wdt:P495 ?country }       # country of origin `P495`
  # OPTIONAL { ?item wdt:P921 ?topic }       # main subject `P921` 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?countryLabel
ORDER BY DESCC (?nb)
... Loading ...

🇶 HAL Structures on Wikidata per country (P17)

5942 structures HAL author ID with in Wikidata

#defaultEndpoint:Wikidata
SELECT 
?countryLabel (count(?item) AS ?nb)           # counting occurence per country
WHERE {
  ?item wdt:P6773 ?halIdValue.               # HAL structure ID `P6773` in ?halIdValue
  OPTIONAL { ?item wdt:P17 ?country }        # country `P17`
  # OPTIONAL { ?item wdt:P921 ?topic }       # main subject `P921` 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?countryLabel
ORDER BY DESC (?nb)
... Loading ...

Structures on Wikidata -> authors -> with HAL author id

5942 structures HAL author ID with in Wikidata

#defaultEndpoint:Wikidata
#defaultEndpoint:Wikidata
SELECT ?item ?halIdValue ?genderLabel (YEAR(?birthDate) AS ?birthYear) WHERE {
  VALUES ?structure {
    # wd:Q1194988 # Paris 8
    # wd:Q13531686 # Paris Saclays
    wd:Q20669873 # University of Toulouse
        wd:Q1933558  # University Toulouse - Jean Jaurès
        wd:Q1273188  # Toulouse III University - Paul-Sabatier
        wd:Q51784003 # Toulouse Mirail
    wd:Q64716811 # PRES University of Toulouse
  }
  ?item wdt:P31 wd:Q5 ;
        wdt:P108 ?structure .
  OPTIONAL { ?item wdt:P4450 ?halIdValue } # halIdValue -> 64 
  OPTIONAL { ?item wdt:P569 ?birthDate. }
  OPTIONAL { ?item wdt:P21 ?gender. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }
ORDER BY DESC (?birthYear)
... Loading ...

Work to come

See also

Help page:

HAL SPARQL

HAL API:

Wikidata SPARQL

Federation request:

Wiki HAL

Lingua Libre technical helps
Template {{Speakers category}} • {{Recommended lists}} • {{To iso 639-2}} • {{To iso 639-3}} • {{Userbox-records}} • {{Bot steps}}
Audio files How to create a frequency list?Convert files formatsDenoise files with SoXRename and mass rename
Bots Help:BotsLinguaLibre:BotHelp:Log in to Lingua Libre with PywikibotLingua Libre Bot (gh) • OlafbotPamputtBotDragons Bot (gh)
MediaWiki MediaWiki: Help:Documentation opérationelle MediawikiHelp:Database structureHelp:CSSHelp:RenameHelp:OAuthLinguaLibre:User rights (rate limit) • Module:Lingua Libre record & {{Lingua Libre record}}JS scripts: MediaWiki:Common.jsLastAudios.jsSoundLibrary.jsItemsSugar.jsLexemeQueriesGenerator.js (pad) • Sparql2data.js (pad) • LanguagesGallery.js (pad) • Gadgets: Gadget-LinguaImporter.jsGadget-Demo.jsGadget-RecentNonAudio.jsLiLiZip.js
Queries Help:APIsHelp:SPARQLSPARQL (intermediate) (stub) • SPARQL for lexemes (stub) • SPARQL for maintenanceLingualibre:Wikidata (stub) • Help:SPARQL (HAL)
Reuses Help:Download datasetsHelp:Embed audio in HTML
Unstable & tests Help:SPARQL/test
Categories Category:Technical reports