Property talk:P2464

From Wikidata
Jump to navigation Jump to search

Documentation

DescriptionID used by BugGuide (Q4986057) database, which collects photographs and locations for Arthropods (mostly insects and spiders) in US and Canada. In January 2017 over 53 thousand taxons were recorded illustrated by over a million photographs.
Associated itemBugGuide (Q4986057)
Applicable "stated in" valueBugGuide (Q4986057)
Data typeExternal identifier
Domain
According to this template: Taxons
According to statements in the property:
taxon (Q16521), hybrid (Q42621) or validly published name (Q17134993)
When possible, data should only be stored as statements
Allowed values[1-9]\d{0,6}
ExampleHermetia illucens (Q285029)7646
Exoprosopa rhea (Q13632226)95034
Formatter URLhttps://bugguide.net/node/view/$1
Tracking: usageCategory:Pages using Wikidata property P2464 (Q29168713)
Lists
Proposal discussionProposal discussion
Current uses
Total47,523
Main statement47,502 out of 53,000 (90% complete)>99.9% of uses
Qualifier2<0.1% of uses
Reference19<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Format “[1-9]\d{0,6}: value must be formatted using this pattern (PCRE syntax). (Help)
List of violations of this constraint: Database reports/Constraint violations/P2464#Format, hourly updated report, SPARQL
Single value: this property generally contains a single value. (Help)
List of violations of this constraint: Database reports/Constraint violations/P2464#Single value, hourly updated report, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
List of violations of this constraint: Database reports/Constraint violations/P2464#Unique value, hourly updated report, SPARQL (every item), SPARQL (by value)
Item “taxon name (P225): Items with this property should also have “taxon name (P225)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2464#Item P225, search, SPARQL
Item “taxon rank (P105): Items with this property should also have “taxon rank (P105)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2464#Item P105, search, SPARQL
Item “parent taxon (P171): Items with this property should also have “parent taxon (P171)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2464#Item P171, search, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2464#Entity types
Scope is as main value (Q54828448), as reference (Q54828450): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2464#Scope, SPARQL

Test if taxon in Arthropoda tree[edit]

This ID should be only used for Arthropoda taxons. The query below is supposed to test for it:

SELECT ?item ?BugGuideID 
{
    ?item wdt:P2464 ?BugGuideID .      # has BugGuideID 
    ?item wdt:P171  ?pItem .           # has parent item
    MINUS {?item wdt:P171+ wd:Q1360. } # exclude items in Arthropoda tree
    MINUS {?item wdt:P105 wd:Q38348. } # exclude Arthropoda (Q1360) itself
}
Try it!

However it always times out. Its ugly cousin below worked for me, when applied separately to genus, then to species ranks and finally to other ranks.

SELECT  ?item ?BugGuideID 
{
    ?item wdt:P2464 ?BugGuideID .  # has BugGuideID 
    ?item wdt:P105  ?rank .
    #VALUES ?rank {wd:Q34740 }     # Try it on "genus" rank only
    VALUES ?rank {wd:Q35409 wd:Q36602 wd:Q2455704 wd:Q37517 wd:Q2136103 wd:Q5867959 wd:Q227936 wd:Q38348 wd:Q2889003 wd:Q3965313 
       wd:Q5868144 wd:Q5867051 wd:Q14817220 wd:Q2981883 wd:Q1153785 wd:Q3504061 wd:Q10861426  } . # Try it on taxonomic ranks above genus
    ?item wdt:P171  ?pItem .       # has parent item
  
    MINUS {?item wdt:P171 # exclude items in Arthropoda tree
                 |wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171  
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171  
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171   
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171  
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171     
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171     
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171 
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171 
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 |wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 #|wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 #|wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171/wdt:P171
                 wd:Q1360 . }
}
Limit 20

Can someone improve on it? --Jarekt (talk) 14:56, 17 January 2017 (UTC)[reply]