Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link genera to closest-by super taxon #21

Open
mfrasca opened this issue Jan 31, 2018 · 2 comments
Open

link genera to closest-by super taxon #21

mfrasca opened this issue Jan 31, 2018 · 2 comments
Labels

Comments

@mfrasca
Copy link
Member

mfrasca commented Jan 31, 2018

at the moment most genera are linked to families, even if families have subfamilies and tribes (no subtribe information yet, see #20).
we should be linking genera to the first available above taxon, whatever that might be.

sqlite> select p.rank, c.rank, count(*) from taxon c, taxon p
   ...> where c.parent_id=p.id group by p.rank, c.rank order by c.rank;
0|1|488
1|2|348
2|3|229
1|5|26926

as you see: all families point to order, all subfamilies point to family, all tribes point to subfamily, but then genera point straight into family.

@mfrasca
Copy link
Member Author

mfrasca commented Feb 1, 2018

done it for 122 genera in the Orchid family.

sqlite> select p.rank, c.rank, count(*) from taxon c, taxon p 
   ...> where c.parent_id=p.id group by p.rank, c.rank order by c.rank;
0|1|488
1|2|348
2|3|242
3|4|51
1|5|26802
4|5|122

@mfrasca mfrasca added the botany label Feb 20, 2018
@mfrasca
Copy link
Member Author

mfrasca commented Apr 1, 2018

updating:

sqlite> select p.rank, c.rank, count(*) from taxon c, taxon p
   ...> where c.parent_id=p.id group by p.rank, c.rank order by c.rank;
0|1|490
1|2|355
2|3|243
3|4|48
1|5|26719
2|5|7
3|5|1
4|5|199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant