Wikidata:WikiProject Ecology

From Wikidata
Jump to navigation Jump to search
ecology (Q7150) is about interactions between species, including this Yellow-headed Caracara (Q28484) on a Hydrochoerus hydrochaeris (Q131538) in the Pantanal (Q157603)

Welcome to WikiProject Ecology, a community initiative to collaborate on the curation of ecological knowledge across disciplinary, taxonomic, geographic, linguistic, jurisdictional and other boundaries. Feel free to change anything here if you think this would be an improvement. If you are not sure or if you have other ideas or comments, you can leave a note on the discussion page.

About[edit]

This page, its subpages and the associated discussion pages are intended to assist WikiProject Ecology with the structuring of ecological knowledge available through Wikidata.

Properties[edit]

Existing[edit]

Proposed[edit]

To be proposed[edit]

  • ...

Items[edit]

Main items[edit]

Other items[edit]

Queries[edit]

Main queries[edit]

Habitats and habitat types[edit]

Habitats and habitat types by number of species, with examples[edit]

The following query uses these:

  • Properties: habitat (P2974)  View with Reasonator View with SQID, taxon rank (P105)  View with Reasonator View with SQID, instance of (P31)  View with Reasonator View with SQID, subclass of (P279)  View with Reasonator View with SQID
    #title: Habitats and habitat types by number of species, with examples
    SELECT 
      DISTINCT 
      ?type ?typeLabel 
      ?count ?sample ?sampleLabel
    WITH {
      SELECT DISTINCT ?type (COUNT(?item_) AS ?count) (SAMPLE(?item_) AS ?sample)  
      WHERE {
        ?item_ wdt:P2974 ?habitat .
        ?item_ wdt:P105 wd:Q7432 .
        ?habitat wdt:P31|wdt:P279 ?type .
      }
      GROUP BY ?type ?count ?sample
    } AS %items
    WHERE {
      INCLUDE %items 
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }  
    }
    GROUP BY ?type ?typeLabel ?count ?sample ?sampleLabel 
    ORDER BY DESC(?count)
    LIMIT 200
    
Habitat types[edit]

The following query uses these:

  • Properties: instance of (P31)  View with Reasonator View with SQID
    #title: Habitat types
    SELECT ?item ?itemLabel WHERE {
      ?item wdt:P31 wd:Q111535406 .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    }
    

Publications[edit]

Habitat-related publications about species with no habitat statements[edit]

The following query uses these:

  • Properties: title (P1476)  View with Reasonator View with SQID, main subject (P921)  View with Reasonator View with SQID, taxon name (P225)  View with Reasonator View with SQID, habitat (P2974)  View with Reasonator View with SQID
    #title: Habitat-related publications about species with no habitat statements
    SELECT 
      DISTINCT
        ?item ?title ?topic ?taxonname
    
    WHERE {
      hint:Query hint:optimizer "None".
      
    {  SERVICE wikibase:mwapi {
        bd:serviceParam wikibase:api "Search";
                        wikibase:endpoint "www.wikidata.org";
                        mwapi:srsearch "habitat and haswbstatement:P31=Q13442814 -haswbstatement:P921=Q52105".
          ?page_title wikibase:apiOutput mwapi:title.
      }
     }
    UNION
    {  SERVICE wikibase:mwapi {
        bd:serviceParam wikibase:api "Search";
                        wikibase:endpoint "www.wikidata.org";
                        mwapi:srsearch "habitat -and haswbstatement:P31=Q13442814 -haswbstatement:P921=Q52105".
          ?page_title wikibase:apiOutput mwapi:title.
      }
     }
      BIND(IRI(CONCAT(STR(wd:), ?page_title)) AS ?item)
      
      ?item wdt:P1476 ?title.
      FILTER REGEX(LCASE(?title), "habitat").
    
      ?item wdt:P921 ?topic.
      ?topic wdt:P225 ?taxonname .
      FILTER NOT EXISTS { ?topic wdt:P2974 [] } .
      
    }
    

Taxa[edit]

Genera of species with at least one habitat statement[edit]

The following query uses these:

  • Properties: habitat (P2974)  View with Reasonator View with SQID, main subject (P921)  View with Reasonator View with SQID, parent taxon (P171)  View with Reasonator View with SQID, taxon rank (P105)  View with Reasonator View with SQID, taxon name (P225)  View with Reasonator View with SQID
    #title: Genera of species with at least one habitat statement
    SELECT 
      DISTINCT
        ?topicparent ?taxonname (COUNT(DISTINCT ?item) AS ?count)
    
    WHERE {
    
      ?topic wdt:P2974 [] .
      ?item wdt:P921 ?topic.
      ?topic wdt:P171 ?topicparent .
      ?topicparent wdt:P105 wd:Q34740 .
      ?topicparent wdt:P225 ?taxonname .
      
    }
    GROUP BY ?topicparent ?taxonname
    ORDER BY DESC(?count)
    


Genera of species with no habitat statements[edit]

The following query uses these:

  • Properties: title (P1476)  View with Reasonator View with SQID, main subject (P921)  View with Reasonator View with SQID, parent taxon (P171)  View with Reasonator View with SQID, taxon rank (P105)  View with Reasonator View with SQID, taxon name (P225)  View with Reasonator View with SQID, habitat (P2974)  View with Reasonator View with SQID
    #title: Genera of species with no habitat statements
    SELECT 
      DISTINCT
        ?topicparent ?taxonname (COUNT(DISTINCT ?item) AS ?count)
    
    WHERE {
      hint:Query hint:optimizer "None".
      
    {  SERVICE wikibase:mwapi {
        bd:serviceParam wikibase:api "Search";
                        wikibase:endpoint "www.wikidata.org";
                        mwapi:srsearch "habitat and haswbstatement:P31=Q13442814 -haswbstatement:P921=Q52105".
          ?page_title wikibase:apiOutput mwapi:title.
      }
     }
    UNION
    {  SERVICE wikibase:mwapi {
        bd:serviceParam wikibase:api "Search";
                        wikibase:endpoint "www.wikidata.org";
                        mwapi:srsearch "habitat -and haswbstatement:P31=Q13442814 -haswbstatement:P921=Q52105".
          ?page_title wikibase:apiOutput mwapi:title.
      }
     }
      BIND(IRI(CONCAT(STR(wd:), ?page_title)) AS ?item)
      
      ?item wdt:P1476 ?title.
      FILTER REGEX(LCASE(?title), "habitat").
    
      ?item wdt:P921 ?topic.
      ?topic wdt:P171 ?topicparent .
      ?topicparent wdt:P105 wd:Q34740 .
      ?topicparent wdt:P225 ?taxonname .
      FILTER NOT EXISTS { ?topic wdt:P2974 [] } .
      
    }
    GROUP BY ?topicparent ?taxonname
    ORDER BY DESC(?count)
    

Other queries[edit]

  • ...

Literature[edit]

Scholia[edit]

Tools[edit]

  •  Info You can use the AutoEdit tool to quickly add label and description in many languages to items within the scope of WikiProject Ecology.


Subpages[edit]

This WikiProject has the following subpages:

Participants[edit]

[+] Add yourself to the list

The participants listed below can be notified using the following template in discussions:
{{Ping project|Ecology}}

See also[edit]