the logic would be something like:
- get your list of taxa
taxon_listfromGET /observations/species_counts?order=asc - initialize a variable
counter=0to keep your place as you iterate through thetaxon_list - initialize an empty array
fiilter_taxato hold up to 200 taxa to filter - loop
while counter < len(taxon_list) or len(filter_taxa) > 0:
a. add up to200 - len(filter_taxa)taxa tofilter_taxafromtaxon_liststarting from positioncounter, and incrementcounterby 1 for each taxon added.
b. get up to 200observationsfromGET /observations?taxon_id=filter_taxa&per_page=200&order_by=observed_on&order=asc
c. for eachobsfromobservations, if thetaxon_idon thisobsexists infilter_taxa: (1) get observation date and other fields of interest fromobs, (2) add your fields of interest to the record intaxon_list, (3) remove thetaxon_idfromfilter_taxa