Viquiprojectes actius

edit

A subpàgines d'usuari:

Idees per treballar a Wikidata

edit

Documents d'Amical, presentacions:

edit

https://commons.wikimedia.org/wiki/Category:Amical_Wikimedia_tutorials

Varis

Interessant formació en anglès: https://www.wikidata.org/wiki/Wikidata:Training

Curs Wikidata de Wikimedia Chile: https://drive.google.com/drive/folders/1WpUmAgoWVB_BLetbT_ou70WswwgJg3Go

Un MOOC en francès sobre Wikidata: https://www.wikidata.org/wiki/Wikidata:MOOC/Course_outline

Per exemple https://docs.google.com/presentation/d/1MM3Z8ZvFaFU1HeRDnPcmpoAZTYoRyVxPB9r8A4TNn2U/edit

Per optimitzar consultes via SPARQL: https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/query_optimization

Eina SQUID: https://sqid.toolforge.org/#/

OpenRefine: https://www.wikidata.org/wiki/Wikidata:Tools/OpenRefine/Editing/Tutorials/Basic_editing

QuickStatements: https://quickstatements.toolforge.org

WikiShootMe: https://wikishootme.toolforge.org

Eina Reasonator: https://tools.wmflabs.org/reasonator

Exemples setmanals de consultes: https://www.wikidata.org/wiki/Wikidata:Weekly_query_examples

OpenStreetMap i la seva connexió amb Wikidata

Què vol dir la seva connexió: https://2019.stateofthemap.org/attachments/GUUUYW_OpenStreetMap_and_Wikidata_-_Awesome_Together.pdf

Eina Overpass-Turbo: https://overpass-turbo.eu

Eina osm-wd link: https://osm.wikidata.link

osm-cat: https://osm-catalan.github.io/osmcatmap

Eina Sophox, per fer-hi consultes SPARQL (no actualitzat, incomplet: https://sophox.org

Eina Qlever, consultes sparql a osm, wikidata i d'altres fonts de dades enllaçades: https://qlever.cs.uni-freiburg.de

Eina Level0, fàcil creació i edició: http://level0.osmz.ru/index.php

Eina Taginfo: https://taginfo.openstreetmap.org/reports/frequently_used_keys_without_wiki_page

OpenRoute: https://maps.openrouteservice.org

Topotresc: https://www.topotresc.com

Visor ACA: https://sig.gencat.cat/visors/VISOR_ACA.html

VISOR OSM.cat: https://osm.cat

Com crear rutes a WP i WD a partir d'OSM: https://en.wikipedia.org/wiki/Wikipedia:Creating_route_maps_from_OpenStreetMap_data

Plantilla Mapdraw a VP https://ca.wikipedia.org/wiki/Plantilla:Map_draw

Relacions OSM, Wikidata i Wikipedia, Kartographer: https://www.mediawiki.org/wiki/Help:Extension:Kartographer/OSM

Extensió Kartographer https://www.mediawiki.org/wiki/Help:Extension:Kartographer/OSM#Limitation

Tutorials i exemples setmanals a Youtube: https://www.youtube.com/channel/UCa5oYsCabGo7XwwKGqo7Qcw

Per a Python:

Consultes mapes històrics: https://www.ign.es/web/mapasantiguos/index.html

Visors de mapes: komoot, alltrails.com,

Experiments amb cerques a Wikidata

edit

Algunes consultes:

Museus i el seu tipus, a una ciutat determinada (Girona)

SELECT ?instancia ?instanciaLabel ?queque ?quequeLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,es,ca". }
  ?instancia (wdt:P31/(wdt:P279*)) wd:Q33506;
    p:P31 _:b4.
  _:b4 ps:P31 ?queque.
  ?instancia wdt:P131 wd:Q7038.
}
LIMIT 200
Try it!

Utilització de Open Linked Data amb OpenStreetMap http://overpass-turbo.eu https://www.youtube.com/watch?v=GdYcY6YmRDE

Subclasses de bioquímic

SELECT ?subclasse ?subclasseLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?subclasse (wdt:P279*) wd:Q593644.
}
ORDER BY (?subclasseLabel)
LIMIT 2000
Try it!

Persones de ciència

# Persones de ciència
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?article WHERE {
  ?item (wdt:P106/(wdt:P279*)) wd:Q901;
    wdt:P19 wd:Q7038.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ca". }
  OPTIONAL {
    ?article schema:about ?item;
      schema:inLanguage "ca";
      schema:isPartOf <https://ca.wikipedia.org/>.
  }
}
ORDER BY (?itemLabel)
Try it!

Platges de municipis de Catalunya

#Platges de municipis de catalunya
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?muniLabel ?article ?coord WHERE {
  ?item (p:P31/ps:P31/(wdt:P279*)) wd:Q40080;
    wdt:P131 ?muni;
    wdt:P625 ?coord.
  ?muni wdt:P31 wd:Q33146843.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ca". }
  OPTIONAL {
    ?article schema:about ?item;
      schema:inLanguage "ca";
      schema:isPartOf <https://ca.wikipedia.org/>.
  }
}
ORDER BY (?muniLabel)
Try it!

Exmunicipis, data de finalització

SELECT  ?muni ?muniLabel ?diade WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?muni  p:P31 [ps:P31 wd:Q33146843 ; pq:P582 ?diade ]
}
Try it!

El mateix, però no funciona gaire bé

#muncipis, data de finalització
SELECT ?muni ?muniLabel ?diadefi WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?muni wdt:P31 wd:Q33146843 ;
        p:P31 [ps:P31 wd:Q33146843 ; pq:P582 ?diadefi ]
}
Try it!

Catalans vius nascuts entre dues dates (de usuari:amadalvarez)

#Catalans vius nascuts entre 1898 i 1918
SELECT ?s ?desc ?article 
WHERE
{
  ?s wdt:P31 wd:Q5 ;
     wdt:P569 ?naix .
  ?s wdt:P19 ?lloc .
  ?lloc wdt:P131*/wdt:P706* wd:Q5705.
  FILTER (?naix > "1898-01-01"^^xsd:dateTime && ?naix < "1918-01-01"^^xsd:dateTime)
  MINUS { ?s wdt:P570 [] }
  ?s rdfs:label ?desc FILTER(lang(?desc)="ca").
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ca". }
  ?article schema:about ?s .
  ?article schema:inLanguage "ca" .
  ?article schema:isPartOf <https://ca.wikipedia.org/>
}

LIMIT 100
Try it!

Codis postals que comencem amb certs dígits

SELECT ?item ?itemLabel (?p4335 AS ?IDESCAT_code) {
  ?item wdt:P31 wd:Q33146843 .
  ?item wdt:P281 ?p4335 .
  FILTER(STRSTARTS(?p4335,'17'))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?p4335
Try it!

Muntanyes de Catalunya on no hi ha l'altitud especificada - sí que solen ser a la Viquipèdia

SELECT DISTINCT ?inst_ncia_de ?inst_ncia_deLabel ?llocLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?inst_ncia_de wdt:P31 wd:Q8502;
    wdt:P131 ?lloc.
  ?lloc wdt:P31 wd:Q33146843.
  MINUS { ?inst_ncia_de wdt:P2044 ?elev.}
}
ORDER by (?llocLabel)
LIMIT 20000
Try it!

Mercats de Catalunya

SELECT ?mercat ?mercatLabel ?llocLabel 
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?mercat wdt:P31 wd:Q330284.
  ?mercat wdt:P131 ?lloc.
  ?lloc wdt:P31 wd:Q33146843.
}
ORDER BY (?llocLabel)
LIMIT 100
Try it!


Per buscar a etiqueta (Maia)

SELECT ?item ?label
WHERE
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "www.wikidata.org";
                    wikibase:api "Generator";
                    mwapi:generator "search";
                    mwapi:gsrsearch "inlabel:Montcal";
                    mwapi:gsrlimit "max".
    ?item wikibase:apiOutputItem mwapi:title.
  }
  ?item rdfs:label ?label.
  FILTER CONTAINS(?label, "Montcal")
}
Try it!


Per buscar un mot a l'etiqueta, ràpidament:

SELECT DISTINCT ?item ?label
WHERE
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "www.wikidata.org";
                    wikibase:api "Generator";
                    mwapi:generator "search";
                    mwapi:gsrsearch "inlabel:platja"@ca;
                    mwapi:gsrlimit "max".
    ?item wikibase:apiOutputItem mwapi:title.
  }
  ?item rdfs:label ?label. FILTER( LANG(?label)="ca" )

}
Try it!

Carrers i places de municipis de Catalunya

SELECT ?street ?streetLabel ?ciutatLabel ?ambquiLabel ?instanciaLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca". }
  VALUES ?espais {
                      wd:Q79007 # carrer
                      wd:Q174782 #plaça
                      wd:Q7543083 #avinguda
                     }
  ?street wdt:P31 ?espais;
    wdt:P131 ?ciutat.
  ?ciutat wdt:P31 wd:Q33146843.
  ?street wdt:P31 ?instancia.
  OPTIONAL {?street wdt:P138 ?ambqui.}
}
LIMIT 1000
Try it!

Torres de telegrafia òptica:

SELECT ?torre_de_telegrafia__ptica ?torre_de_telegrafia__pticaLabel ?coordenades WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?torre_de_telegrafia__ptica (p:P31/ps:P31/(wdt:P279*)) wd:Q19850578.
  OPTIONAL { ?torre_de_telegrafia__ptica wdt:P625 ?coordenades. }
}
LIMIT 100
Try it!

Per a Sophox: llocs amb etiqueta historic=optical_telegraph

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#place=*
SELECT DISTINCT ?osmId ?loc ?wda ?que ?queLabel WHERE {
  ?osmId osmt:historic 'optical_telegraph'.
  ?osmId osmm:loc ?loc .
  ?osmId osmt:wikidata ?wda . 
SERVICE <https://query.wikidata.org/sparql> { 
  ?wda wdt:P31 ?que . 
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                       ?que rdfs:label ?queLabel}
  }
  
}
LIMIT 500
Try it!

Cerques a WD de geometries a mapes - punts, vies, àrees, etc.

SELECT ?item ?itemLabel ?geoshape ?geoshapeLabel
WHERE
{
  VALUES ?item { wd:Q142 }
  ?item wdt:P3896 ?geoshape.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Try it!

Consultes SPARQL sobre centres docents

edit

Instituts Educ Sec a Catalunya

SELECT ?centre ?centreLabel ?llocLabel ?ubiseuLabel ?muniLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,gl,es,en,as". }
# Institut de Catalunya 
  ?centre (wdt:P31/(wdt:P279*)) wd:Q50359544.
# possible localitzat a entitat territorial administrativa
  OPTIONAL { ?centre wdt:P131 ?lloc. }
# possible ubicat a  
  OPTIONAL { ?centre wdt:P159 ?ubiseu.
# potser ubicat a un carrer o plaça (potser hi faltaria alguna altra cosa)
    OPTIONAL { ?ubiseu wdt:P31 wd:Q79007 .
               ?ubiseu wdt:P31 wd:Q174782 .
             ?ubiseu wdt:P131 ?muni . }
# potser ubicat a un municipi de Catalunya
    OPTIONAL { ?ubiseu wdt:P31 wd:Q33146843 .  }
  }
}
ORDER BY (?llocLabel)
LIMIT 1000
Try it!

Escoles a Catalunya. No funciona pas gaire bé. Cal millorar-la.

# Escola a Catalunya
# no funciona, exhaureix temps
# possible localitzat a entitat territorial administrativa
# possible ubicat a  
# potser ubicat a un carrer o plaça 
# o potser ubicat a un municipi de Catalunya
SELECT ?centre ?centreLabel ?llocLabel ?ubiseuLabel ?muniLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,gl,es,en,as". }
  ?centre (wdt:P31/(wdt:P279*)) wd:Q3914.
  
  
  {
   ?centre wdt:P131 ?lloc.
           ?lloc wdt:P31 wd:Q33146843 .
  }
UNION
  {
    ?centre wdt:P159 ?ubiseu.
     {
      ?ubiseu wdt:P31 wd:Q79007, wd:Q174782;
        wdt:P131 ?lloc.
             ?lloc wdt:P31  wd:Q33146843.      
    }
    UNION
     { ?ubiseu wdt:P31 wd:Q33146843. 
             BIND (wd:Q33146843 as ?lloc).
              }
  }
                 
}
ORDER BY (?llocLabel)
LIMIT 100
Try it!

Centres d'educació secundària: instituts de secundària, instituts d'educació secundària, instituts de Catalunya...

SELECT ?escola ?escolaLabel ?ciutatLabel ?ambquiLabel ?instanciaLabel ?espaisLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es". }
  ?ciutat wdt:P31 wd:Q33146843.
  ?escola wdt:P131 ?ciutat.
  VALUES ?espais {
                      wd:Q3807410 # escola
                      wd:Q55043
                      wd:Q50359544
                   
                     }
  ?escola wdt:P31 ?espais.
  
  
#   ?escola wdt:P31 ?instancia.
  
  OPTIONAL {?escola wdt:P138 ?ambqui.}
}
LIMIT 2000
Try it!


Aquesta consulta funciona per a centre educatius... però surten repetits. Permet fer-ne el map, això sí

SELECT ?escola ?escolaLabel ?ciutatLabel ?ambquiLabel ?instanciaLabel ?espaisLabel ?coord WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es". }
  ?ciutat wdt:P31 wd:Q33146843.
  ?escola wdt:P131|wdt:P159 ?ciutat.
  ?escola wdt:P31/wdt:P279* wd:Q3918.
  ?escola wdt:P625 ?coord.
   
   ?escola wdt:P31 ?instancia.
  
#  OPTIONAL {?escola wdt:P138 ?ambqui.}
}
LIMIT 20000
Try it!

Generació de la taula QIDs - Refs per als centres educatius de Cataluya

SELECT ?item ?codi WHERE {
  VALUES ?centres { wd:Q111236457 wd:Q50359544 wd:Q111244857 wd:Q111594067 }
  ?item wdt:P31 ?centres;
        wdt:P528 ?codi.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Centres educatius de Catalunya sense coordenades (e.g. si algú les hi ha tretes per "ser localitzat a" i restricció)

SELECT ?item ?codi ?coor WHERE {
  VALUES ?centres { wd:Q111236457 wd:Q50359544 wd:Q111244857 wd:Q111594067 }
  ?item wdt:P31 ?centres;
        wdt:P528 ?codi.
  FILTER NOT EXISTS { ?item wdt:P625 ?coor }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Centres educatius de Catalunya - exemple d'ús de data

SELECT ?item ?itemLabel ?nal ?ladata WHERE {
  ?item wdt:P31 wd:Q111594067;
        p:P2196 ?stat.
?stat ps:P2196 ?nal;
       pq:P585 "+2022-00-00T00:00:00Z"^^xsd:dateTime;
       pq:P585 ?ladata.

        
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Centres docent catalans que es diuen "Joan Oró"

SELECT ?item ?itemLabel ?coor ?quiLabel ?genLabel WHERE {
  VALUES ?centres { 
  wd:Q111236457 
  wd:Q50359544 
  wd:Q111244857 
   wd:Q111594067 
  }
  ?item p:P31/ps:P31 ?centres.        
  ?item wdt:P625 ?coor;
        rdfs:label ?itemL.
       filter(contains(?itemL, "Joan Oró"@ca)).
        FILTER( LANG(?itemL)="ca")
        
#defaultView:Map     
   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Mapes de centres educatius catalans (2n cicle educació infantil, ESO, batxillerat i cicles formatius)

edit

Mapes generats a partir de la informació a Wikidata, i per tant de les dades obertes de la Generalitat de Catalunya.

Llibres, obres escrites i obres literàries

edit

Literary Canon: https://github.com/j-pastor/wd-literary-canon

Obres escrites en català

SELECT ?item ?itemLabel ?obraLabel WHERE {
  ?item wdt:P31/wdt:P279* wd:Q47461344;  
        wdt:P407 wd:Q8752;
        wdt:P31 ?obra
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Altres consultes

edit

Consulta Overpass-Turbo per tenir totes els centres docents (amenity=school amb ref=*)

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“amenity=school and ref=* in Gironès”
*/
[out:csv("ref","wikidata","name";false)][timeout:25];
// fetch area “Gironès” to search in
{{geocodeArea:"Catalonia"}}->.searchArea;
// gather results
(
  // query part for: “amenity=school and ref=*”
  node["amenity"="school"]["ref"](area.searchArea);
  way["amenity"="school"]["ref"](area.searchArea);
  relation["amenity"="school"]["ref"](area.searchArea);
);
// print results
out ;

Consulta a Overpass-Turbo per tenir la llista de carrers que tenen epònim informat

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“highway=* and "name:etymology:wikidata"=* ”
*/
[out:csv("name:etymology:wikidata","name";false)][timeout:25];
// gather results
(
  // query part for: “highway=* and "name:etymology:wikidata"=*”
  node["highway"]["name:etymology:wikidata"]({{bbox}});
  way["highway"]["name:etymology:wikidata"]({{bbox}});
  relation["highway"]["name:etymology:wikidata"]({{bbox}});
);
// print results
out ;

Llista de places amb nom que són highway sense etimologia

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“place=square and highway!=* and "name:etymology:wikidata"!=* and name=*”
*/
[out:csv("name";false)][timeout:25];
// gather results
(
  // query part for: “place=square and highway!=* and "name:etymology:wikidata"!=* and name=*”
  node["place"="square"]["highway"!~".*"]["name:etymology:wikidata"!~".*"]["name"]({{bbox}});
  way["place"="square"]["highway"!~".*"]["name:etymology:wikidata"!~".*"]["name"]({{bbox}});
  relation["place"="square"]["highway"!~".*"]["name:etymology:wikidata"!~".*"]["name"]({{bbox}});
);
// print results
out ;

Mapa de municipis que són banyats pel Riu Ser

[out:xml][timeout:125];
{{geocodeArea:Catalonia}}->.searchArea;
wr["waterway"="river"]["name"="el Ser"](area.searchArea);
out geom qt;
rel(around._:0)["admin_level"=8];
out geom qt;

Llista de districtes de Barcelona que creua la Ronda del Mig

[out:csv(::id,::type,"name",admin_level)][timeout:125];
{{geocodeArea:Barcelona}}->.searchArea;
wr["highway"="primary"]["name"="Ronda del Mig"](area.searchArea);
rel(around._:0)["admin_level"=9];
out;

Consulta a Wikishootme dels centres docents de Catalunya, per visualitzar si tenen imatge a WD

https://wikishootme.toolforge.org/#lat=41.96797652284642&lng=2.791299819946289&zoom=15&layers=wikidata_image,wikidata_no_image&sparql_filter=VALUES%20%3Fcentres%20%7B%20wd%3AQ111236457%20wd%3AQ50359544%20wd%3AQ111244857%20wd%3AQ111594067%20%7D%0A%20%20%3Fq%20wdt%3AP31%20%3Fcentres

Consultes federades

edit

No dóna resultats:

PREFIX bned:  <https://datos.bne.es/def/> 
PREFIX bner:  <https://datos.bne.es/resource/> 

select ?llibre ?titol 
               WITH {
  SELECT ?llibre ?titol ?bneid ?cosa WHERE
{
wd:Q234663 wdt:P950 ?bneid
           BIND (URI(CONCAT("https://datos.bne.es/resource/",?bneid)) as ?cosa )             
  } }  AS %1  
          
               where {
                 INCLUDE %1
SERVICE <http://datos.bne.es/sparql> {
                 
  ?bneid bned:OP5001 ?llibre.
?llibre rdfs:label ?titol
}
      }
LIMIT 2
Try it!

Centres educatius per tipus

# centres educatius de Catalunya per tipus, en un territori determinat (província de Girona)
SELECT DISTINCT ?centre ?centreLabel ?coordinate ?layer ?layerLabel
WITH {
  SELECT ?centre 
WHERE {
  ?centre wdt:P131* wd:Q7194.
 } } AS %1
WHERE {
  INCLUDE %1.
  ?centre wdt:P31/wdt:P279* wd:Q5341295.
  ?centre wdt:P625 ?coordinate.
  ?centre wdt:P31 ?layer
SERVICE wikibase:label {
bd:serviceParam wikibase:language "ca,en,es" .
}
}
#defaultView:Map
Try it!

No funciona:

SELECT ?workLabel WHERE {
  wd:Q165257 wdt:P2799 ?id
  BIND(concat("http://data.cervantesvirtual.com/person/", ?id) as ?bvmcID)
  SERVICE <https://data.cervantesvirtual.com/openrdf-sesame/repositories/data> {
    ?bvmcID <https://rdaregistry.info/Elements/a/authorOf> ?work .
    ?work rdfs:label ?workLabel
  }
}
Try it!

Funciona:

SELECT ?proglang ?resource ?homepage{
            ?proglang wdt:P31 wd:Q9143.

	    SERVICE <http://dbpedia.org/sparql> {
              ?resource rdf:type wd:Q9143;
                        owl:sameAs ?proglang;
                        foaf:homepage ?homepage.
              }
          }
          LIMIT 50
Try it!

Projecte universitats

edit

Tots els ítems localitzats en algun lloc de Catalunya que són subclasse d'universitat

SELECT ?univ ?univLabel ?llocLabel
WITH
{
  SELECT ?univ
WHERE {
 ?univ wdt:P131* wd:Q5705;
       } } AS %1
WHERE
{
  INCLUDE %1
          ?univ wdt:P31/wdt:P279* wd:Q3918;
        wdt:P131 ?lloc  
        SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,es,en". }
        }
Try it!

Química

edit

Inchikeys d'@egonw (https://github.com/egonw/wikidata-chemistry/tree/main) Wikidata, Viquiprojecte Químcia https://www.wikidata.org/wiki/Wikidata:WikiProject_Chemistry

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT (str(substr(str(?compound),32)) AS ?wikidata) (str(?key) AS ?id) WHERE {
  ?compound wdt:P235 ?key .
}
Try it!

Tipus de compost químic, entitat química, etc...


PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?compound ?compoundLabel ?key  ?inst ?instLabel WHERE {
  ?compound wdt:P235 ?key .
    ?compound        wdt:P31 ?inst.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 10
Try it!

Plantilles i mòduls

edit

https://ca.wikipedia.org/wiki/Ajuda:Com_buscar_pàgines#Exemples_multifunció:

  • MediaWiki syntax

https://workingwithmediawiki.com/book/chapter4.html

  • Plantilla per veure paràmetres d'una plantilla

https://ca.wikipedia.org/wiki/Plantilla:Parameters

  • Per trobar totes les variables d'una plantilla (wikitext a ipg.wt) des de shell Linux:

egrep '{{{[A-Z]+_.*}}}' ipg.wt

o bé

awk -F '{ for(i=2; i<=NF; i+=2) print $i }' ipg.wt