Running observation queries

I am not sure if this is a bug. I’m looking for ways to use the FAQ ‘Search for observation field values’ URL workflow to pick up interactions between taxa.

The FAQ mentions this: 'You can easily combine these with other search strings. For example, the following shows all observations marked as being of insect herbivores of Ecualyptus.

https://www.inaturalist.org/observations?taxon_id=47158&field:Interaction->Herbivore%20of=51815

I tried following that URL but it came up with ‘no results found’. I thought, OK, let’s test one of my own. These two records:

A: https://www.inaturalist.org/observations/138965125
B: https://www.inaturalist.org/observations/138821583

Are connected by the Observation field: ‘A’ is Eating ‘B’, and ‘B’ is Passive Partner to ‘A’.

So I tried this URL:

https://www.inaturalist.org/observations?taxon_id=48548&field:Interaction->Eating=581056

Again, ‘no results found’. What am I doing wrong?

filtering on observation fields is much more literal than you’re supposing. ex. https://www.inaturalist.org/observations?verifiable=any&place_id=any&field:Eating:%20(Interaction)=https:%2F%2Fwww.inaturalist.org%2Fobservations%2F138821583

there’s not an actual bug here.

2 Likes

I wasn’t supposing anything - I was just following the instructions in the FAQ’s. That looks awfully complicated. Is there anywhere I can go to read up on how to interpret and write that sort of code? It’s only picked up one half of the interaction - I need both sides to come up (only those records for which butterfly A has been recorded eating plant B)

let me rephrase.

if in your observation, you add an observation field called “Eating: (Interaction):”, and you set the value equal to “https://www.inaturalist.org/observations/138821583”, searching by any other observation field or any other value will do you no good. you will only be able to return the observation by filtering for the specific observation field that you used or the observation field + value combination.

this is why this query works when yours does not:
https://www.inaturalist.org/observations?verifiable=any&place_id=any&field:Eating:%20(Interaction)=https:%2F%2Fwww.inaturalist.org%2Fobservations%2F138821583

here’s an example of my observation using an observation field and how to filter for it by observation field:

note that in my observation, i’m setting the observation field value to a particular taxon rather than a link to another observation.

I added the “Interaction->Herbivore of” observation field to that first observation so you can see how they are structured differently:

image

Note that if you click the name of the observation field, you can select to view “Observations with this field and value”.

image

https://www.inaturalist.org/observations?verifiable=any&place_id=any&field:Interaction->Herbivore%20of=581056

Also - it looks like you have multiple photos here from different dates - these should be entered as separate observations rather than combined into one. As it stands now, with the observation date and annotations, for example, your data is entered as if the organism was in the adult life stage on September 5th whereas that’s the date associated with the caterpillar photo. And the adult doesn’t appear to be eating the species linked in your observation field.

1 Like

Thanks! In fact this is exactly what I want to do for caterpillar records. The reason for the different dates is that I reared a lot of Vanessa cardui from that particular plant (that actual specimen, which grows down the road from me) and the eggs, caterpillar, pupa and adult were all photographed at different dates. The adult WAS using the plant, but as a larva. This was simply an exercise to see what was possible.

To record dates accurately, our caterpillar rearing group would need to create a new (dated) record of this kind for every life stage, including the adult. Not difficult to do.

How do I go about adding that extra observation field? That will help me with this particular issue.

But there’s another. I was looking for any records in iNat (not mine) where a Sphingid moth was observed nectaring on a Baobab. I know that some iNat Citizen Scientists were doing this in Botswana (I’ve read the paper produced from the records) but I don’t have the details of how they were recording the interaction. I thought there was only one way to do this, but now it seems like there are many ways to skin that particular cat…

1 Like

Still need to know this

Hi Steve. I’m confused about what you’re looking to do.

If you want to add an observation field such as “Interaction->Herbivore of” to some of your Lepidoptera observations, you just start typing the field name where it says “Choose a Field” under “Observation Fields”. Select the field, and then choose or type the value that you want.

If you want to create a brand new field to capture some type of interaction, that’s possible but I would really recommend using an existing field if at all possible. You can search for existing fields here: https://www.inaturalist.org/observation_fields

Let me know if I’m missing your point!

1 Like

Working fine, thanks!

1 Like