Data Extraction from Observation Fields

crab_baguette on the main site is looking to gather seasonality data of termite nuptial flights. I just created the Termite Imago(s) field with a “Flight Evidence” option to mark observations with evidence of flights. Slowly, the field should get filled up with plenty of observations. What I’m wondering now is how we can best extract the seasonality data from observations within the field for each taxon/location etc. I would like to avoid creating a project as some users are opted out (thus somewhat skewing data), but I’m open to using one if necessary. Either way, project needed or not, how can we export the data? The end goal would be to preferably create a graph with the data similar to that of annotations.

1 Like

I would go to the export page and query for all observations that have your field:

You can then change what else is included in the export – it sounds like you want taxon, location, and date. With the data downloaded, you can use whatever data processing/visualization software you prefer.


iNat’s CSV export is fine if you really need the underlying information about individual observations, or if you plan slice and dice a single set of data in many ways. but if you’re just trying to make seasonality graphs or charts, then getting observation histogram data via the API is probably a more efficient way to get what you need (since it gives you aggregated data).

when the system is back up, i can provide some more information on this approach, if needed.

I tried out the export function and it worked fine (besides the interface bugging a bit), but that would also be great if you get the chance – perhaps the API could be used to make automatically updating graphs at whatever interval, and then that could be displayed on a site or Discord bot etc. So far, for the CSV data, I just exported a list of dates and used a pivot table to organize by month, and then graphed here. In the future, especially as more data is collected, I’d like to make comparison graphs of species to directly compare their flight times, or even compare the flight times of individual species within different geographical regions (not sure what type of graph would be good for this, maybe just overlapping line graphs/scatter plots). Unfortunately, I’m terrible at using sheets so I don’t know how I’d even do that yet (API may help?).
Thanks for the idea.

you can find the available parameters for the API’s observation histogram endpoint at:!/Observations/get_observations_histogram

i think the data for your graph, assuming place_id=64492 (Northeastern US) and taxon_id=119933 (genus Reticulitermes), could be obtained via this API request:

it returns:

   "results": {
      "month_of_year: {

you can use your favorite scripting language or data analytics tool get the data from the API and create whatever kind of chart or graph you like.

for example, this page will visualize the data in a bar chart like yours:

or here’s an example of a line graph done in R:

and here’s an explanation of how to make a bar chart using Excel:

let me know if you need any other information.

EDIT: i just remembered that if

iNat has an “experimental” Compare tool, which could help you create comparison graphs like so:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.