I created a new version of this that now has three interrelated tables...
https://stockslager.github.io/iNat/rewild_plants_visited.html
1 - List of plant species that exist in the umbrella.
2 - Counts of insect species visiting the plant selected from table 1.
3 - Individual observations of the insect from table 2 visiting the plant in table 1.
I still need to add a bunch of species and genera... it requires a list that's apart from the projects... otherwise you can't toggle between species and genus (you can't see the visitors to both Solidago and Solidago canadensis without two api calls... so I just have a toggle between the species and genus lists to avoid two calls in one click).
Comments
Fun search. Since most of the goldenrods bloom around the same time and provide similar ecological services, setting the search to pull all the results for the genus, rather than individual species, might be more informative, though I'm not sure that the observation fields will allow a search to be broadened that way.
I'm not sure that's possible... I don't think you can do a server side "join" on observation fields since they're user defined. Maybe you could spin through arrays on the client side (do an external join) but it seems like it would take "hard coding" or somewhat sophisticated logic that I am no longer capable of! :o)
I like the new table. It's a fun way to investigate the interactions between plants and animals.
thx! I like it too. It requires two different lists to be able to toggle between species and genera. The only other option would have been to make everyone add tags to certain plant OBS.
For now I've mostly added Grovedale's plant list... I'll do the rest over time. Most of your stuff will be under the nectaring toggle on the second page... but I haven't added your plants... so you'll only find yours when you've had visitors to a species that Grovedale also planted.
Version 2.0.1 is now available ~
1 - Support for "Nectar / Pollen delivering plant" and "Name of Associated Plant."
2 - Ability to pass in custom lists of genera and species.
3 - Ability to pass in a "default view"... valid values (visiting, nectaring, pollinating, associating)
For example:
If I only wanted to see sumacs...
https://stockslager.github.io/iNat/rewild_plants_visited.html?g_list=4484507&s_list=4484518
If I wanted to see those same sumacs but default to the "Nectar Plant" view...
https://stockslager.github.io/iNat/rewild_plants_visited.html?g_list=4484507&s_list=4484518&view=nectaring
@m_whitson
Neat! It's fun to see what all was visiting each sumac species.
What do the list numbers in the url correspond to? I was hoping I could find something like the taxon ID number to try this with different species, but it doesn't look like that's how this is set up. Modifying some of the iNat urls to get better search results is about as fancy as I get, programming wise.
you would build them here --> https://www.inaturalist.org/lists/m_whitson
one for genera and one for species (only because the species count api would otherwise pass all the plants within any genus back if they were in a single list). it'll still kinda work if you combine them and pass the same list in for both g_list and s_list. here are mine (where the sumac lists are)...
https://www.inaturalist.org/lists/stockslager
if you open one of your lists, you can see the numerical ID in the URL.
Interesting....
OK -- I'll have to play with that some to get a better feel for how it works.
1st Table...
sets place_id to Hamilton county and filters by list on the server side using the species count api. (i'd pass it the project_id, but some insects have been observed on plants that don't have a corresponding plant observation within the umbrella).
2nd Table...
defaults project_id to the umbrella and sets the appropriate observation field. also sets iconic_taxa to everything but plants. makes an api call to the species count api returning any non-plant observation "with" the appropriate observation field set.
3rd Table...
defaults project_id to the umbrella, set's taxon_id to the non-plant (usually insect) taxon_id selected from table 2, makes the api call. and then loops through the observation fields in the data returned from the API to find the one with a matching observation field name and observation field value (plant taxon ID). the "show all" does the same thing but only looks for a match on observation field name (not value).
each click issues only a single API call which is limited by "place_id" on the first table and "project_id" on the second two tables.
just in case there are lurkers... It still defaults to the default view and to re-wild lists if there are no parameters passed in... https://stockslager.github.io/iNat/rewild_plants_visited.html
Add a Comment