User:Anthere/Divers

Chats edit

dans wikidata et pays de naissance edit

The following query uses these:

  • Properties: instance of (P31)     , place of birth (P19)     , country (P17)     
    SELECT  ?pays ?paysLabel
     (COUNT(?item) AS ?nombreA) 
    
    WHERE
    {
      ?item wdt:P31 wd:Q146 . # Instances de chat domestique
      ?item wdt:P19 ?birth .  # Collecte pays de naissance
      ?birth wdt:P17 ?pays . 
     SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Pour afficher le label
    }
    
    GROUP BY ?pays ?paysLabel # groupe par label du pays de naissance
    

Chats célèbres et leur article sur en:wikipedia edit

The following query uses these:

  • Properties: instance of (P31)     
    SELECT ?item ?itemLabel ?article
    WHERE
    {
      ?item wdt:P31 wd:Q146 .                      # Identifie les chats domestiques
    	?article 	schema:about ?item ;
    			schema:isPartOf <https://en.wikipedia.org/> .  # Qui ont un article sur en wp
    	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    }
    LIMIT 200
    

Carte de lieux de naissance de chats et de chiens edit

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map
SELECT ?item ?itemLabel ?geo ?pict ?birthLabel WHERE { 
 { ?item wdt:P31 wd:Q146 .} UNION { ?item wdt:P31 wd:Q144 .}. # Sélectionne chat domestiques et chiens domestiques
  ?item wdt:P19 ?birth .      # Récupère pays de naissance
  ?birth wdt:P625 ?geo .      # Récupère les coordonnées géographiques du pays de naissance
 OPTIONAL { ?item wdt:P18 ?pict .}.      # Affiche les images si présentes
         
        
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
} 
LIMIT 50

Même requête écrite différemment edit

The following query uses these:

  • Properties: instance of (P31)     , place of birth (P19)     , coordinate location (P625)     , image (P18)     
    SELECT ?itemLabel ?bestioleLabel ?geo ?pict ?birthLabel WHERE { 
     ?item wdt:P31 ?bestiole .
      ?item wdt:P19 ?birth .
      ?birth wdt:P625 ?geo .
      
      VALUES ?bestiole {
        wd:Q144        # Chat
        wd:Q146}.      # Chien
     
      OPTIONAL { ?item wdt:P18 ?pict .} # Affichage optionnelle de la photo
             
            
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
    } 
    LIMIT 50
    

Wiki Loves Women edit

béninoises avec articles sur en mais absence d'article sur fr wikipedia edit

The following query uses these:

  • Properties: sex or gender (P21)     , country of citizenship (P27)     
    SELECT ?item ?sitelink WHERE { 
      ?item wdt:P21 wd:Q6581072 .     # Sont femmes
      ?item wdt:P27 wd:Q962.          # Sont béninoises
      ?sitelink schema:about ?item .  
      ?sitelink schema:inLanguage "en" . # Ont un article dans en wp
      FILTER NOT EXISTS {                # Filtre en excluant
        ?wfr schema:about ?item . 
        ?wfr schema:inLanguage "fr"      # excluant celles qui ont déjà un article en français
      } 
    }
    

African sportwomen edit

The following query uses these:

  • Properties: instance of (P31)     , sex or gender (P21)     , country of citizenship (P27)     , continent (P30)     , occupation (P106)     , subclass of (P279)     , image (P18)     
    #African sportswomen
    SELECT ?item ?itemLabel ?countryLabel ?occupationLabel ?image WHERE {
      ?item wdt:P31 wd:Q5; #give me a human
        wdt:P21 wd:Q6581072; #whose gender (P21) is female
        wdt:P27 ?country. #and who has a country of citizenship (P27)
      ?country wdt:P30 wd:Q15. #and that country of citizenship is in the continent (P30) Africa
      ?item wdt:P106 ?occupation. #and who also has an occupation (P106)
      ?occupation (wdt:P279*) wd:Q18536342. #which is any subclass of (P279) 'competitive player'
      MINUS { ?item wdt:P27 wd:Q29999. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,ar,es". }
      OPTIONAL { ?item wdt:P18 ?image. } #show an image if there is one
    }
    

Entrées bio hommes/femmes WikiData/Wikipedia par continent edit

The following query uses these:

  • Properties: instance of (P31)     , sex or gender (P21)     , country of citizenship (P27)     , continent (P30)     
    SELECT ?country ?countryLabel 
       (COUNT(?item) AS ?NombreHumains)
    
    WHERE {
    
       ?item wdt:P31 wd:Q5; #give me a human
            wdt:P21 ?genre; #give me a person
             wdt:P27 ?country. #and who has a country of citizenship (P27)
             ?country wdt:P30 wd:Q15. #and that country of citizenship is in the continent (P30) Africa
             ?article schema:about ?item ;
      	schema:isPartOf [ wikibase:wikiGroup "wikipedia" ] .                 # A un article dans wikipedia
            	#	  schema:isPartOf <https://en.wikipedia.org/> . 
      
       VALUES ?genre {
           wd:Q8441            # Homme
           wd:Q6581072}.      # Femme
       
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    
    }
      GROUP BY  ?country ?countryLabel # groupe par label du pays de naissance
    

Wiki Loves Africa edit

A compléter

Projet wikiquote edit

Requête 1: femmes présentes dans fr.wikiquote et dans wikidata edit

The following query uses these:

  • Properties: sex or gender (P21)     
    SELECT ?item ?itemLabel ?article
    WHERE
     {
       ?item wdt:P21 wd:Q6581072 .                                                        # Est une femme
     	?article 	schema:about ?item ;
     			schema:isPartOf <https://fr.wikiquote.org/> .                 # A un article dans wikiquote
     	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
     }
     LIMIT 100
    

Requête 2 : femmes présentes dans fr.wikiquote et dans wikidata, et dont l'article (dans au moins une langue de wikipedia) est "featured" quality edit

The following query uses these:

  • Properties: instance of (P31)     , sex or gender (P21)     
    SELECT DISTINCT ?item ?itemLabel ?FAsitelink ?WQsitelink
    WHERE
     {
       ?item wdt:P31 wd:Q5.                                                         # Est un être humain
       ?item wdt:P21 wd:Q6581072 .                                                  # Est une femme
         ?FAsitelink                                                                # There is a Wikipedia Featured article
         schema:about ?item;
         wikibase:badge wd:Q17437796 .                                              # Sitelink is badged as a Featured Article
                                                                                    # schema:isPartOf [ wikibase:wikiGroup "wikipedia" ] .               
         ?WQsitelink                                                                # And a sitelink to a frwq page
         schema:about ?item ;
         schema:isPartOf <https://fr.wikiquote.org/>.  
     	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
     }
     LIMIT 100
    

Requête 3 : femmes absente de fr.wikiquote, présentes dans wikidata, et dont l'article wikipedia en anglais ou en frnançais est "featured" quality edit

The following query uses these:

  • Properties: instance of (P31)     , sex or gender (P21)     
    SELECT DISTINCT ?item ?itemLabel ?FAsitelink ?WQsitelink
    WHERE
     {
       ?item wdt:P31 wd:Q5.
       ?item wdt:P21 wd:Q6581072 .
         ?FAsitelink # There is a Wikipedia Featured article
         schema:about ?item;
         wikibase:badge wd:Q17437796 . # Sitelink is badged as a Featured Article
       {
         ?FAsitelink schema:isPartOf <https://fr.wikipedia.org/> .
         }
    UNION
       {
        ?FAsitelink schema:isPartOf <https://en.wikipedia.org/> .
         }
    
       MINUS
       {
       ?WQsitelink # And a sitelink to a frwq page
         schema:about ?item ;
         schema:isPartOf <https://fr.wikiquote.org/>.  
         }
     	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
     }
     LIMIT 100
    

Requête 4 : femmes présentes dans fr.wikiquote, et qui ont au moins un article wikipedia "featured" quality (affiche les codes langues concernés, groupés) edit

The following query uses these:

  • Properties: instance of (P31)     , sex or gender (P21)     
    SELECT DISTINCT ?item ?itemLabel ?WQsitelink (GROUP_CONCAT(?FAlang;separator=", ") AS ?FAlanguages)  WHERE {
      ?item wdt:P31 wd:Q5.
      ?item wdt:P21 wd:Q6581072 .
      ?FAsitelink # There is a Wikipedia Featured article
         schema:about ?item;
         schema:inLanguage ?FAlang;
         wikibase:badge wd:Q17437796 . # Sitelink is badged as a Featured Article
      FILTER REGEX(STR(?FAsitelink), ".wikipedia.org/wiki/") .
    
      ?WQsitelink # And a sitelink to a frwq page
         schema:about ?item ;
         schema:isPartOf <https://fr.wikiquote.org/>.  
    
        SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" } .
    } GROUP BY ?item ?itemLabel ?WQsitelink
    

Requête 5 : Women that have a featured article on Wikipedia(s) and a page on the French Wikiquote, ordered by the number of sitelinks. edit

The following query uses these:

  • Properties: instance of (P31)     , sex or gender (P21)     
    SELECT DISTINCT ?item ?itemLabel ?WQsitelink (GROUP_CONCAT(?FAlang;separator=", ") AS ?FAlanguages) ?sitelinks WHERE {
      ?item wdt:P31 wd:Q5 ;
            wdt:P21 wd:Q6581072 ;
            wikibase:sitelinks ?sitelinks .
      ?FAsitelink # There is a Wikipedia Featured article
         schema:about ?item;
         schema:inLanguage ?FAlang;
         wikibase:badge wd:Q17437796 . # Sitelink is badged as a Featured Article
      FILTER REGEX(STR(?FAsitelink), ".wikipedia.org/wiki/") .
    
      
      ?WQsitelink # And a sitelink to a frwq page
         schema:about ?item ;
         schema:isPartOf <https://fr.wikiquote.org/>.  
    
      SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" } .
    } GROUP BY ?item ?itemLabel ?WQsitelink ?sitelinks
    ORDER BY DESC(?sitelinks)
    

Visualisations edit

A classer et approfondir

Mh classés edit

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map("markercluster":())
SELECT ?mh ?coords WHERE {

  ?mh wdt:P1435 wd:Q10387684 .
  ?mh wdt:P625 ?coords .
}

Vue sur les hopitaux edit

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map("markercluster":())
SELECT ?hop ?coords WHERE {

  ?hop wdt:P31 wd:Q16917 .
  ?hop wdt:P625 ?coords .
}

Visualiser les départements français edit

Formes géométriques : P3896

Pour visualiser les départements français

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map
SELECT ?dpt ?form WHERE {

  ?dpt wdt:P31 wd:Q6465 .
  ?dpt wdt:P3896 ?form
}

Mot magique Layer

Carte de France population

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map
SELECT * WHERE {
  ?dpt wdt:P31 wd:Q6465 .
  ?dpt wdt:P3896 ?form .
  ?dpt wdt:P1082 ?pop .

}

En mode Elmer

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map
SELECT * WHERE {
  ?dpt wdt:P31 wd:Q6465 .
  ?dpt wdt:P3896 ?form .
  ?dpt wdt:P1082 ?layer .
}

En mode normalisé par million

The following query uses these:

Features: map (Q24515275)     

#defaultView:Map
SELECT * WHERE {
  ?dpt wdt:P31 wd:Q6465 .
  ?dpt wdt:P3896 ?form .
  ?dpt wdt:P1082 ?pop .
BIND (floor (?pop/1000000) AS ?layer )
}