-
Notifications
You must be signed in to change notification settings - Fork 5
Add top species chart to overview page #580
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4be5caf
Add plot
vanessavmac 41c5e4f
Fix formatting
vanessavmac 61a55b1
Flip order so most frequent at top
vanessavmac 63b8910
Fix formatting
vanessavmac 688e461
Merge branch 'main' of https://github.com/RolnickLab/ami-platform int…
vanessavmac 1ed5be8
Fix order
vanessavmac 634dbbf
Merge branch 'main' of https://github.com/RolnickLab/ami-platform int…
vanessavmac ece621b
Merge branch 'main' into 387-add-top-species-chart-to-overview-page
mihow c49176c
Merge branch 'main' into 387-add-top-species-chart-to-overview-page
mihow 15aa4e5
Merge branch 'main' into 387-add-top-species-chart-to-overview-page
mihow af386a0
Merge branch 'main' of github.com:RolnickLab/antenna into 387-add-top…
mihow e57f565
feat: add top species chart to project overview
mihow 34f9195
fix: show average counts instead of cumulative
mihow c8c2445
chore: cleanup
mihow 2a424c0
feat: show stats over the year
mihow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this lowest to highest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right. I just tested out the chart by modifying the species count and made the corrected changes. Here's an example top species chart:

If top_n=1, then it looks like this:

Note, this is what the test data looks like which modified here.

@mihow Is the plot showing the correct data? I thought that the plot would show 2 occurrences of Vanessa atalanta and 1 occurrence of Vanessa itea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Vanessa,
The
TEST_TAXA_CSV_DATA
is for Taxon entries, not Occurrence entries. So adding duplicates there won't have the effect you are looking for.The charts are showing which occurrences have been IDed to which Taxa. In the test data, you want to modify the number of occurrences that are generated for each taxon, rather than the taxonomy choices, if that makes sense?
Also if you make your self "is_staff" in the Django admin, then you can modify the occurrence IDs pretty quickly without regenerating. But I like both approaches (the test data should have different numbers of IDs for different species).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand; where is the test data of the occurrences generated/modified? Based on my testing using the admin, the Top Species chart appears to work -- see my other comment below