# Species Accumulation Curves for iNat data

**URL:** <https://forum.inaturalist.org/t/species-accumulation-curves-for-inat-data/38222>\
**Category:** General\
**Tags:** question\
**Created:** [December 30, 2022, 9:50pm UTC](https://forum.inaturalist.org/t/species-accumulation-curves-for-inat-data/38222 "2022-12-30T21:50:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pisum](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@pisum](https://forum.inaturalist.org/u/pisum)\
**Post date:** [December 30, 2022, 10:41pm UTC](https://forum.inaturalist.org/t/species-accumulation-curves-for-inat-data/38222/2 "2022-12-30T22:41:11Z")

</div>

getting data from the API is fairly straightforward. each point in your curve could be obtained by getting the `total_results` value from `/v1/observations/species_counts`, setting `d2` (observed date) or `created_d2` (submit date) parameter value equal to the date of the particular point of interest. (i’m not sure exactly which date you would want to use for your purposes. there are arguments for using either. there’s even an argument for using identification date, although it would be much harder to get data based on identification date.)

suppose you wanted to accumulate based on observed date. then just as an example, you could use the following requests to get 3 data points for Texas (`place_id=18`):

| cumulative datetime | request URL | `total_results` value (as of 2022-12-30) |
| --- | --- | --- |
| 2020-12-31 23:59:59 (local time) | [https://api.inaturalist.org/v1/observations/species\_counts?place\_id=18&d2=2020-12-31T23:59:59&per\_page=0](https://api.inaturalist.org/v1/observations/species_counts?place_id=18&d2=2020-12-31T23:59:59&per_page=0) | 25055 |
| 2021-12-31 23:59:59 (local time) | [https://api.inaturalist.org/v1/observations/species\_counts?place\_id=18&d2=2021-12-31T23:59:59&per\_page=0](https://api.inaturalist.org/v1/observations/species_counts?place_id=18&d2=2021-12-31T23:59:59&per_page=0) | 27511 |
| 2022-12-31 23:59:59 (local time) | [https://api.inaturalist.org/v1/observations/species\_counts?place\_id=18&d2=2022-12-31T23:59:59&per\_page=0](https://api.inaturalist.org/v1/observations/species_counts?place_id=18&d2=2022-12-31T23:59:59&per_page=0) | 30010 |

if you wanted to use submit date as your basis instead, just switch `d2` for `created_d2`. (note that time zones are handled a bit differently. i believe `d2` gets filtered based on local time zone, while `created_d2` gets filtered based on UTC.)

if you want more points, just make more requests for the appropriate dates. if you want to change place or other filter criteria, just add / change parameters, as needed. (it’s also worth noting that “species counts” in iNat are actually counts of “leaf taxa”. so you’d have to adjust parameters if you actually need species.)

once you have your data, you can plot the points as you like.

i’m not aware of anyone having written anything to make such curves using iNat data, but it shouldn’t be too difficult if you know what you’re doing. (it would even be possible to set something up in Excel relatively easily, as long as you’re not trying to get too many data points. see [https://forum.inaturalist.org/t/using-excel-api/22378](https://forum.inaturalist.org/t/using-excel-api/22378), and search for “WEBSERVICE”.)

---

_[View the full topic](https://forum.inaturalist.org/t/species-accumulation-curves-for-inat-data/38222)._
