Searching by proximity to another species

Hi, forgive me if the has already been addressed, but a quick search didn’t turn up anything that addresses my specific question.

Is there a way to search for observations within a stated distance of observations of another species, without having to draw a circle individually around each observation. The “seen nearby” function is much too general for what I am thinking of. For instance, If I wanted to see what plants are associated with Tsuga mertensiana in my county, I would want to be able to search for all plant observations that are within, say 500’ of all Tsuga mertensiana observations in my county. I could do this in explore by taking each T mertensiana observation, zooming in, and drawing with the circular boundary tool, hoping that I can eyeball the 500’ correctly. A bit time consuming, so is there a better way to do this?
thanks, rmcon

Maybe someone could figure out how to do this with the API, but this sounds like it would be easier to do in a GIS software.

I suppose one could create a place boundary by buffering off the observation points and use that in inat. Unfortunately, I don’t have GIS software since I retired. I suppose I should look into what’s available for a reasonable cost.

Wait a bit longer as there are folks here on the forum who have done something similar. They might chime in and say how, or say why you would have to go the GIS route.

And there used to be at least one good GIS program that was freeware. Maybe not ESRI good but for many applications we might have, a freeware bit of software is often good enough. Again, I’d give this a few days to see who else responds.

QGIS is free! So is R but that requires coding.

if you’re trying to get a complete list of observations or a list of species that are near hemlock, i’d export plant observations from your county and load those into QGIS.

if you’re just trying to quickly visualize distribution and are okay with clicking on dots to see more details, this may or may not help: https://jumear.github.io/stirfry/iNat_map?view=subsetratio&verifiable=true&iconic_taxa=Plantae&taxon_id=68089&place_id=2278&compare_exclude_param=taxon_id (use the observation info for Superset layer to allow you to click on any dot)

I am look to get a complete plant list. T mertensiana was only an example, although one of the species I am interested in. I like to see how species fit into their environment and which species have similar needs. It occurred to me that inat would be something I could use. I will check out qgis, hopefully it will be similar enough to arcgis that I can transfer my skills.

qgis is different enough from arcgis that you’ll be looking for instructions–but the general idea behind both are the same. There are lots of tutorials for qgis, but as qgis is updated the tutorials become outdated. So look for recent tutorials if something seems different.

if you’re just looking for a plant list, one option may be to use some sort of spatial SQL query, if you’re familiar with that. QGIS includes a SpatiaLite db interface, but there are other (free) spatial SQL setups you could use.

once you’ve got your data in a table with geometry, you might be able to get your answer in a single query. something like:

SELECT b.taxon_family_name, b.taxon_id, b.scientific_name, b.common_name, count(*) as obs_count
FROM observations AS b
WHERE b.taxon_id <> 68089 -- not Tsuga mertensiana 
  AND EXISTS (
        SELECT 1
        FROM observations AS a
        WHERE a.taxon_id = 68089 -- Tsuga mertensiana 
          AND ST_Distance(
                ST_Transform(b.geom, 3857),
                ST_Transform(a.geom, 3857)
          ) <= 500 -- meters
      )
GROUP BY b.taxon_family_name, b.taxon_id, b.scientific_name, b.common_name
ORDER BY count(*) DESC

I don’t use QGIS, but I would think this would be very simple. In ArcGIS Pro, the workflow would be:

  • On iNat, export observations of all plants within area of interest (potentially filter to Research Grade only, if desired, use only observations without obscured locations or remove manually after exporting)
  • In ArcGIS Pro, use the XY Table to Point tool to import plant observations
  • Using Select by Attributes, select all observations of Tsuga mertensiana
  • Use Buffer tool to buffer within desired distance
  • Use Select by Location tool to select all observations within buffer
  • Either export all selected observations to a new feature class then export to table, or export selected features directly to table.
  • From there you could import into Excel, and create a PivotTable with species names and counts

I know you won’t be using ArcGIS Pro, but I’d imagine the process should be similar for QGIS. It would be quick (10-15 mins), and with one export you could do this for any species you’d like within the geographic area of interest.

By editing the url of individual Tsuga observations, you can zoom in faster and to the exact radius you need… but you would still have to open each Tsuga observation individually.

By adding “&radius=0.01” to the url of an observation you can list all observations within 0.01 km = 10 meter of that observation.

500 feet are 152.4 m so you need to paste:

&radius=0.1524

thats a nice workaround! I probably can limp along with that until I get GIS. I looked into QGIS, and I def need to upgrade my computer, even if I emptied it of everything else, I think it doesn’t have enough room. I just bought it for email and drafting documents back when I had mega GIS power at work.

you could probably install a spatialite tool and create a spatialite database containing ~50000 obs with 100MB or so. then run the query i have from above.

here are the top 10 plant taxa (regardless of rank) from Alpine County, CA within 500m of a T. mertensiana observation (ignoring accuracy values and assuming distance only between the coordinate values of each observation):

taxon_family_name taxon_id scientific_name common_name obs_count
Fabaceae 47121 Lupinus lupines 328
Polemoniaceae 52190 Ipomopsis tenuituba slendertube skyrocket 321
Gentianaceae 56352 Frasera speciosa monument plant 290
Ericaceae 52131 Phyllodoce breweri Purple Mountain-heath 276
Lamiaceae 62678 Monardella odoratissima mountain coyote mint 258
Linaceae 60490 Linum lewisii Lewis flax 254
Ranunculaceae 48244 Aquilegia formosa western columbine 251
Orobanchaceae 76148 Castilleja miniata giant red paintbrush 246
Asteraceae 60843 Wyethia mollis woolly mule’s ears 243
Orobanchaceae 49340 Castilleja Paintbrushes 238

here are the top 10 within 5 meters:

taxon_family_name taxon_id scientific_name common_name obs_count
Plantaginaceae 62688 Penstemon heterodoxus Sierra Penstemon 13
Ericaceae 52131 Phyllodoce breweri Purple Mountain-heath 12
Linaceae 60490 Linum lewisii Lewis flax 9
Fabaceae 47121 Lupinus lupines 8
Lamiaceae 62678 Monardella odoratissima mountain coyote mint 8
Orobanchaceae 76148 Castilleja miniata giant red paintbrush 8
Pinaceae 68083 Pinus albicaulis Whitebark Pine 8
Plantaginaceae 52146 Penstemon newberryi Mountain Pride 8
Polemoniaceae 52190 Ipomopsis tenuituba slendertube skyrocket 8
Polygonaceae 77040 Eriogonum umbellatum sulfur buckwheat 8

Wow that is interessting! Looks like the most common plant within 5m of the tree is Penstemon heterodoxus. A species that’s not in the top 10 on the wider landscape scale (500m)!

looking at the distribution of the two plants, it doesn’t look like there’s a strong geographic correlation between the two. but where they do overlap, maybe the Penstemon is just the most charismatic plant around?

see https://jumear.github.io/stirfry/iNat_map?view=subsetratio&verifiable=true&exact_taxon_id=62688&taxon_id=68089,62688&place_id=2278&compare_exclude_param=exact_taxon_id

It would be interesting to know how charisma affects reporting. I have to admit I wonder if I am just cluttering the system if I observe yet another Calochortus leichtlinii. And then I also wonder whether there is an increased chance of observation next to a good shade tree.

Also speculative, T mertensiana likes locations that have snow lasting late into the summer, so 2 ideas are, more P heterodoxus due to more moisture in late summer, or more observations of P. heterodoxus due to the individual plants being in flower later when the high country is more accessible.

I can see I need to upgrade my computer and my skills.

my sense is that observations tend to be opportunistic and just occur where people have access and when they have time. so it’s possible that these times/locations may happen to coincide with favorable locations for both plants, but i don’t know if we’ll ever be able to see that in the limited data we have for the county.

for example, with millions of observations, you can see that folks in the United States observe more on the weekends and on major warm season holidays (Labor Day, Independence Day, Memorial Day) and also during City Nature Challenge: https://jumear.github.io/stirfry/iNat_calendar_heatmap?place_id=1

… but it’s harder to see in the smaller number of observations available in Alpine County:
https://jumear.github.io/stirfry/iNat_calendar_heatmap?place_id=2278

very true. you could probably navigate some trails using a map of inat observations.

there have been several national parks/nature reserves that I was planning to visit, and checking out online beforehand which trails to walk, where there seemed to be iNat obs in straight or curved lines seemingly going off path into dense vegetation (and looking way too organised to be random GPS drift from a main trail)

when I got to those sites, turns out there were actually trails/paths there, but they were completely unmarked on Google maps/other mapping services; I never would have known they existed/gone to check them out without having seen the odd-looking iNat records of someone who had gone before me