Open neilsquinn opened 4 years ago
Yeah, /GetHomeStats limits what we can do. Having looked into a lot of the API methods on this website, recreating all of these numbers might be difficult. What we can do is better build out the information in the ResultBar component to the right. Right now, the only summary information is the Total samples collected. I will check with the partner organization and see if they are interested in this kind of thing.
Statistics to dynamically generate: water quality records, benthic samples, water quality stations, benthic stations
Stations should be pretty simple, but samples might not be possible because you would need to query the whole sample database.
Having the stats panel at the bottom is cool, but would potentially be cooler if, instead of being static values, they were reformulated based on the filters applied. So, if the user filtered to only the Alliance for the Chesapeake Bay, they would see the numbers of water bodies, samples etc. covered by that group.
This is probably quite ambitious given that the numbers right now are based on this API call: https://cmc.vims.edu/odata/GetHomeStats and we'd have to instead calculate at least some of them live (and make sure they reconcile with the original numbers), so it might be a dumb idea.
If implemented, it would be important to color-code or otherwise change the formatting of the dynamically updated stats to signal to the user that they are being recalculated.