How to efficiently revisit locations of numerous Observations?

I am planning a new research project using iNaturalist, and would appreciate input on what technical hurdles I may face using the mobile app in this way, as it seems so straightforward, which always means it will be difficult.

I will be doing some post-fire research in a California state park that recently burned in a patchy wildfire. There are few detailed pre-fire habitat data for the park, but several thousand high quality plant observations on iNaturalist with relatively fine locality Accuracy. The project in question is here: https://www.inaturalist.org/projects/sugarloaf-ridge-state-park-all-observations

I would like to be able to, in a transformed landscape, revisit the locations of many of these observations in the same time of year they were observed to record whether the species observed there is still present, regrowing from seed or root, or not currently visible.

I can use the mobile app to walk to where an observation of my species of interest was taken, so long as I have those data stored on my phone (as there is no cell service over most of the park) because the app helpfully displays my GPS location on the Search Map Area screen. I can then gather data at each point in turn, by adding a coded comment to the observation e.g., “plant not detected post fire, no regeneration visible.” I can then download the observations as a spreadsheet, including my comments, and use those data to answer a variety of ecological questions.

What am I missing please? Obviously I have not given you much detail in terms of what my questions are or the specific habitats, etc. But in terms of the technical aspects of using the app in this way, what hurdles might I face? Your thoughts would be appreciated. Thank you.

5 Likes

I made a feature request for a “remind me” feature for explicitly this purpose a while back, but it was removed as some of the iNat staff didn’t see any merit in including that functionality.

1 Like

If there is no reception in that area it will be difficult to get accurate and precise GPS co-ordinates on a phone. I personally use a Garmin Dakota 20 to get co-ords for this exact reason.

1 Like

Yay more iNat research!

But I would agree that it can sometimes be challenging to get super precise GPS points from your phone (or mine at least) so I use a little handheld GPS to track specific locations. I use this one:
https://www.cabelas.com/shop/en/garmin-etrex-22x-handheld-gps-unit

Another option if a GPS is cost prohibitive would be to download the observations from GBIF or the iNat API, extract the lat/lon and the species, and then upload to google maps as a personal map points https://support.google.com/mymaps/answer/3024836?co=GENIE.Platform%3DDesktop&hl=en
you can then walk to those points using your google maps (it works without service for me if you download the personal map ahead of time). I’ve used this to mark mostly trees, so the accuracy issues were less of a problem, but looking for herbaceous plants might be somewhat challenging

2 Likes

Just considering… if the observation was then taken with a phone camera, will the coordinates be accurate? I realize, I don’t quite know how that works. Even without cell reception, my phones have always displayed a location on a map (even a blank map when the map image could not be downloaded).

2 Likes

Before searching out a particular observation, I would recommend doing a “reliability check-up” on the original observer. I do this by:

  1. Clicking over to the chronological list of all the observations by that observer.
  2. Checking whether it is reasonable that a human being could’ve moved from one observation to the next in the amount of time between each observation.

I’ve saved myself from several wild goose chases by looking into this first! Some people are unfortunately very sloppy about pin-placement and/or manual time-stamps. Some phone’s GPS updates their location inconsistently, as well. I’m not sure some of my observations in canyon-like environments would pass this test, although I try to go back and check them.

1 Like

I use a phone app when backpacking to track my location on pre-downloaded maps. This works in phone airplane mode so I consider the GPS to be fairly reliable still. The app is called Gaia (iOS/Android) and having just checked, there is a function to take a picture/record notes while tracking your location. This one I believe to be very accurate and generally matches my friends’ Garmin location devices.

Additionally, in my experience using non-gps enabled digital cameras and phones while backpacking, when I upload pictures from my camera to my computer/Google Photos after the hike, not linked to Gaia mentioned above, that sometimes the location is tagged to the same image based on phone’s GPS and timestamp of the image. I wouldn’t say this is more accurate than ±50 feet though.

3 Likes

Ooh, this sounds like an interesting project. Since you mention visiting thousands of sites and wanting to do it efficiently, it would probably be worthwhile to do some prep work up front to save you time in the field. If this sounds too complicated and you’d prefer to just work within the iNaturalist app only, that would be fine too, but you may end up spending a lot of time fiddling with the app. I’d recommend going on a short “test run” using observations in a local park or something, just to get an idea of how well the iNaturalist app does what you want it to do.

If it doesn’t, here are a few thoughts on what you could do to prepare:

  • Like others suggested, it would be a good idea to extract the coordinates from the observations of interest and view them with an offline map viewer.
  • Exporting the coordinates into GPX format will give you the broadest compatibility with both mobile apps and GPS devices.
  • My offline map app of choice is OsmAnd, which uses OpenStreetMap. Compared to Google Maps (which is what the iNat mobile app uses), the map layers available in OsmAnd will have a lot more detailed info relevant to hiking/offroad exploring (terrain, more complete trail coverage, etc.)
  • I haven’t used it myself, but it looks like Gaia GPS is also geared towards hiking/exploring, and is also compatible with GPX track files. That would be worth checking out as well
  • The other piece you mentioned is adding comments to the observations as you visit them. If you generated a list of observation links in the same order as your GPX track, those links could then be opened with the iNaturalist app. How to do that will depend on the device, but it’s usually pretty easy.
  • The GPX spec allows for adding links and other metadata to your points. I’m not sure off the top of my head how to do that, but it’s possible that could let you open iNaturalist observations directly from your map viewer.

Experience with a programming language or at least basic shell scripting would be very useful here. If you’d like, I’d be willing to help look into this some more and put together some scripts or examples for extracting the data you need.

2 Likes

Wow! Thank you all for your really insightful and helpful comments. Over the next couple of days I’m going to try out using just the iNat app for this in the field, and once I’ve done that I’ll have a better idea of which of your excellent suggestions I need to make work.

1 Like

Phones typically use an a-GPS system, assisted GPS. They have a GPS receiver built in, but only with a few bands that talk to the satellites, so they boost accuracy by triangulating from cell phone towers.

The GPS still works (most of the time), when you’re out of cell reception, but time to get an accurate fix may be slow.

Like all GPS units, phone GPSs are easily tricked or blocked by a variety of things, so the accuracy can vary a lot, but in the open with a clear signal cell phone accuracy should be around 5 meters.

2 Likes

I’ve gone out in the field and tried this, and I just haven’t found any way to get my phone to cache observations so that they can be clicked on the map (while offline) and show any details about the observations.

I have GiaGPS, and will need to figure out how to track down previous observations (and have access to a few details about those observations) using cached data.

Again, thank you all for the extremely helpful suggestions.

To start, one way to get the information you need is using the iNaturalist export tool.

If you want to do any processing on that information, though, you’ll be better off using the iNaturalist API, specifically the GET /observations endpoint. You can see an example of some raw observation data from your project here.

I maintain pyinaturalist, which is a tool that helps work with this information in the python programming language. Here’s an example query to get the relevant observations from your project, with comments explaining what each parameter does:

from pyinaturalist.node_api import get_all_observations
observations = get_all_observations(
  project_id=36883,         # ID of the 'Sugarloaf Ridge State Park' project
  created_d1='2020-01-01',  # Get observations from January 2020...
  created_d2='2020-09-30',  # ...through September 2020 (adjust these dates as needed)
  geo=True,                 # Only get observations with geospatial coordinates
  geoprivacy='open',        # Only get observations with public coordinates (not obscured/private)
)

See the documentation for more search parameters you can use.

Now this endpoint returns a TON of information, basically everything needed to produce what you see on an Observation page on iNaturalist. You’ll probably only want a small subset of this information. Here’s an example to pare it down to just the basics, to make it easier to look over:

def simplify_observation(obs):
    """Extract only a few basic fields from an observation record"""
    # Start by getting some top-level values
    relevant_keys = ['id', 'observed_on', 'description'] 
    simplified_obs = {k: obs[k] for k in relevant_keys} 

    # Get some nested values
    simplified_obs['taxon'] = '{}: {} ({})'.format(
        obs['taxon']['rank'],
        obs['taxon']['name'],
        obs['taxon']['preferred_common_name'],
    )
    simplified_obs['coordinates'] = obs['geojson']['coordinates'] 

    # Grab the link to the first photo, if any; use medium size instead of thumbnail
    if obs['photos']:
       simplified_obs['photo_url'] = obs['photos'][0]['url'].replace('square', 'medium')
    return simplified_obs

Then if you call that function on your observations you’ll get something like this:

simplified_observations = [simplify_observation(obs) for obs in observations]
print(simplified_observations[0])
{'id': 58211670,
 'observed_on': '2020-08-29',
 'description': None,
 'taxon': 'species: Alnus rhombifolia (white alder)',
 'coordinates': [-122.508701, 38.436655],
 'photo_url': 'https://static.inaturalist.org/photos/92915769/medium.jpeg?1598927538'}

The next step is to convert this into something you can import into a map viewer, which we can use gpxpy for.

import gpxpy

def convert_observations_to_gpx(observations):
    # Create a new GPX file, track, and segment:
    gpx = gpxpy.gpx.GPX()
    gpx_track = gpxpy.gpx.GPXTrack()
    gpx.tracks.append(gpx_track)
    gpx_segment = gpxpy.gpx.GPXTrackSegment()
    gpx_track.segments.append(gpx_segment)

    # Add observation coordinates
    for observation in observations:
        lat, long = observation['geojson']['coordinates']
        gpx_segment.points.append(gpxpy.gpx.GPXTrackPoint(lat, long))

    # Save to file
    with open('observations.gpx', 'w') as f:
        f.write(gpx.to_xml())

convert_observations_to_gpx(observations)

Then if you run your observations through that (no need to also use the simplify_observation() function from above, that was just to make things easier to read), you’ll get a file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="gpx.py -- https://github.com/tkrajina/gpxpy">
  <trk>
    <trkseg>
      <trkpt lat="-122.510986" lon="38.4358649722"></trkpt>
      <trkpt lat="-122.508701" lon="38.436655"></trkpt>
      <trkpt lat="-122.509084" lon="38.435901"></trkpt>
      <trkpt lat="-122.5094054719" lon="38.45397786"></trkpt>
      ...
    </trkseg>
  </trk>
</gpx>

Which you should be able to view in GaiaGPS. There are several pieces missing from this, including:

  • Adding additional observation details to the GPX metadata
  • Calculating the shortest path to visit all observations and sorting the points in the GPX file
  • An easy way to take notes on observations as you visit them

It’s a start, though. This is just one way to go about it, and there may be other tools out there that can do this kind of thing for you without having to write code, but this is what I happen to be familiar with.

6 Likes

Thank you @jcook ! That is tremendously helpful. I usually use R but my wife uses some Python, and with your tools and code I’m sure we can figure it out.

1 Like

there’s not a really great way in iNaturalist to record absence (undetected). the closest officially sanctioned thing for this is Trips (see Trips feature on iNat - General - iNaturalist Community Forum). some folks have recorded absence using observation fields, but this is not ideal either (see Observations of absence vs presence - General - iNaturalist Community Forum).

if you’re going to record presence, in the context of iNaturalist, it’s probably best to record an entirely new observation, and then link the new observation back to the old observation using some sort of observation field (ex. Link observations - Feature Requests - iNaturalist Community Forum)

comments probably aren’t the best way to capture data like this. the only way that i know of to get comments in bulk is via the API, and then if there are multiple comments, you’d have to pick out the right comment. so you’d probably have to start each such comment with some sort of unique phrase or code that you could use to help distinguish it from other kinds of comments.

you could add notes in the description / notes field, but only if the observation is yours. using an observation field might be better than description / notes, but sometimes users disallow others from adding observation fields to their observations. more advantages of observation fields are that they can be queried and that they can be downloaded as separate fields in the standard CSV export.

i don’t think there’s a single thing that will allow you to do everything you’re talking about, unless you build it yourself. as others have noted, using some sort of offline mapping app that can handle GPX tracks or something similar is probably the easiest way to navigate to specific coordinates.

i would probably get the observations that i’m interested in into a searchable (probably PDF) format that will allow me to review those observations in the field. (i would probably use Print-Friendly iNaturalist Observations (jumear.github.io) and print the results to PDF.) so that way, the GPX track could get me to a particular location, and then i could look up the observation(s) at that location based on coordinates or observation ID.

i would probably track my observations in the field in a spreadsheet, a simple text app, or even just on paper, and then input / import that information after getting back to a good internet connection.

3 Likes

So my eventual solution to this problem is to use the GaiaGPS app, with the data I need attached to each waypoint. It takes a bit of setup but is very efficient in the field. Thank you all for your help.

Great, glad that worked out! Can you give some more details on your setup, in case anyone else stumbles across this thread who wants to try something similar?

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