-
Notifications
You must be signed in to change notification settings - Fork 3
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
tab: species comparison table #152
Comments
One way to do the split between immediate results & background operation is when a user presses #️⃣ a single API call is done to fetch their observation & species counts, and at that time, everyone's "in common" / "not in common" / "unique" counts would be set to "?" in the table until the new results are available and a message shown somewhere in the display: Comparison in progress... or so. A job would then be started that fetches as many users as there are in the table and does the set operations on all of the results. When the results are finally all received and tallied up, the "?" numbers in the table would be filled in. |
Mockup of the comparison stats summary updated taking into consideration some stuff from my later comments. To regenerate this mockup using EmbedUtils -embed fromdata
The same / diff / uniq stats could each be a link to search observations in the set on the web, with
Then if the user pressed ✅, a new display would be generated, showing a paginated display of observation counts of matching species, selecting only the species that are same, total, different, or unique for the selected user in the table vs. all others by default. This comment goes into details about that display: #152 (comment) |
Observation count is not relevant for the initial species comparison display, so that should be dropped. Each link added to the display pushes more against the 2048 character maximum for Discord embed description field. That link can get rather long as more search criteria are added (e.g. quality_grade=research, etc.) and that limits how many users can be shown on the page, and fixed-width columns can't have links, so it's better to only have a single link per user in the table. Varying-length usernames cause "jitter" in the alignment of figures in the table, so they go last and the link should be for the username. Therefore, taking all of those into consideration, it might be better to change the table layout to: -embed fromdata
i.e. The username link would be the total number of observations per user by default. As the user cycles through the now four options with 🔢 reaction (tot, same, diff, uniq), the link would be updated to do a search for only the taxon id#s for each column, respectively, as well as changing which details are shown if they press ✅ for that user. |
Mockup of per species detail when ✅ is pressed with default 🔢 tot and first user benarmstrong selected: -embed fromdata
|
The resulting "Obs. comparison per species vs. ..." display in the mockup in the previous comment has two columns, one for the first user, and the other for "others" (since more than one user can be in the table. That raises a point about how you select to see details. It would either be pairwise or one person vs. everyone else, with reaction buttons to select who is in the detailed comparison. If it's pairwise, then the label of the "others" column should change to "other" for clarity. If the table is for only two users, then details would automatically be pairwise. It looks like there is enough width to do more than two users in the mockup, but that's deceptive. The species names are short in this display, and could be longer. Also, on mobile, there's less available width than you think before table rows start to wrap. Therefore, for simplicity's sake, I think limiting it to two numbers is best, either one user vs. another or one user vs. everyone else (if more than two users in the per-user table). The obs. comparison per species display should have reaction buttons to cycle through the users and change which stat is shown. The title of that display could be changed for three users to "... by benarmstrong and 2 others", or if only two, "... by benarmstrong and michaelpirrello". The title URL would then change from all of benarmstrong's observations of Anura to all of everyone's observations of Anura. To give complete control over which user is selected, a 1️⃣ button could cycle through the available users for Then the 🔢 can appear here again for selecting among the different sets of stats:
|
AntrozousAAA
asked on iNat Discord if there could be a way to do comparisons. This idea has come up before, but was never written down. It would be something like this tool: https://www.inaturalist.org/observations/compareIt would have to be limited to the first 500 species per user to keep the number of API calls down to a minimum. See also #98 which is relevant to solving this problem. In that issue I propose that there could be a reduction in number of API calls if
/v1/observations/observers
supported leaf node taxa counts. However, for this issue we would not just be tallying up the counts, but also would need to iterate over all of the taxa per user in the comparison. That requires one/v1/observations/species_counts
call per user. There's no way around that. Two things might help with this:The text was updated successfully, but these errors were encountered: