Skip to content

Is the families filter working? #4

Description

@jts1882

The following code selects all accepted genera in family Rutaceae:

import pykew.powo as powo
from pykew.powo_terms import Name, Filters

query = { Name.family: 'Rutaceae' }                 
myfilters = [Filters.accepted, Filters.genera]      

result = powo.search(query, filters = myfilters)
print(result.size())
for r in result :
   if 'name' in r and 'author' in r : print(r['name']+" "+r['author'])

Similarly, the species in each genus can be got by changing the query and filters, e.g. for Citrus:

query = { Name.genus: 'Citrus' }                 
myfilters = [Filters.accepted, Filters.species]   

However, the following fails to get a list of families using the same approach:

query = { Name.kingdom: 'Plantae' }                 
myfilters = [Filters.accepted, Filters.families]     

It returns 402,409 results. The "families" filter doesn't seem to work as the same number of results are obtained when just using the "accepted" filter. I tried the "families" filter in some other tests and it didn't seem to do anything.

So two questions, does the "family" filter work? And if not, is there another way of getting a list of families?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions