iNat: iNaturalist Observation Import

Description Usage Arguments Examples

View source: R/iNat.R

Description

Core function for pulling observation data from the iNaturalist API

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
iNat(per_page = 200, order = "desc", order_by = "created_at",
  acc = NULL, captive = NULL, endemic = NULL, geo = NULL,
  identified = NULL, introduced = NULL, mappable = NULL,
  native = NULL, only_id = NULL, out_of_range = NULL, pcid = NULL,
  photos = NULL, popular = NULL, taxon_is_active = NULL,
  threatened = NULL, verifiable = "true", id = NULL, not_id = NULL,
  place_id = NULL, project_id = NULL, rank = NULL, site_id = NULL,
  taxon_id = NULL, without_taxon_id = NULL, taxon_name = NULL,
  user_id = NULL, user_login = NULL, day = NULL, month = NULL,
  year = NULL, term_id = NULL, term_value_id = NULL,
  without_term_value_id = NULL, acc_above = NULL, acc_below = NULL,
  d1 = NULL, d2 = NULL, created_d1 = NULL, created_d2 = NULL,
  created_on = NULL, observed_on = NULL,
  unobserved_by_user_id = NULL, apply_project_rules_for = NULL,
  cs = NULL, csa = NULL, csi = NULL, geoprivacy = NULL,
  taxon_geoprivacy = NULL, hrank = NULL, lrank = NULL,
  id_above = NULL, id_below = NULL, identifications = NULL,
  lat = NULL, lng = NULL, radius = NULL, nelat = NULL,
  nelng = NULL, swlat = NULL, swlng = NULL, list_id = NULL,
  not_in_project = NULL, not_matching_project_rules_for = NULL,
  q = NULL, search_on = NULL, quality_grade = NULL,
  updated_since = NULL, viewer_id = NULL, reviewed = NULL,
  locale = NULL, preferred_place_id = NULL, ttl = NULL)

Arguments

per_page

Results requested per API request page. Cannot exceed 200

order

Query sort order. "desc" (default) for descending and "asc" for ascending

order_by

Sorting field for order paramter. Options are "created_at" (default), "observed_on", "species_guess", "votes", and "id"

acc

Positional accuracy is specified: "true" or "false"

captive

Fetch captive/cultivated observations: "true" or "false"

endemic

Fetch taxa endemic to location: "true" or "false"

geo

Fetch georeferenced observations: "true" or "false"

identified

Fetch observations with community IDs: "true" or "false"

introduced

Fetch taxa introduced to location: "true" or "false"

native

Fetch taxa native to location: "true" or "false"

only_id

Fetch only the record ID: "true" or "false"

out_of_range

Fetch taxa outside of known range: "true" or "false"

pcid

Fetch observations identified by project curators: "true" or "false"

photos

Fetch observations with photos: "true" or "false"

popular

Fetch only favorited observations: "true" or "false"

taxon_is_active

Fetch only taxa with active concepts: "true" or "false"

threatened

Fetch taxa threatened in their location: "true" or "false"

verifiable

Fetch only observations classified as Needs ID or are Research Grade: "true" or "false". Default = "true"

id

Fetch a specific observation ID number

not_id

Exclude a specific observation ID number from a fetch

place_id

Fetch observations based on place ID

project_id

Fetch observations from "[project name]"

rank

Fetch observations with a specific taxon rank. Example options are: "kingdom", "phylum", "order", "family", "genus", "species"

site_id

Fetch observations from iNaturalist affiliate site ID

taxon_id

Fetch observations of taxon ID and descendants

without_taxon_id

Exclude fetching of observations of a taxon ID and descendants

taxon_name

Fetch observations matching "[common name]" or "[scientific name]"

user_id

Fetch observations from user ID number

user_login

Fetch observations by "[user name]"

day

Fetch observation from a given day

month

Fetch observations from a given month

year

Fetch observations from a given year

term_id

Control term ID for annotations

term_value_id

Combined with the term_id paramter to fetch observations with specific annotations

without_term_value_id

Combined with the term_id parameter to exclude observations with specific annotations

acc_above

Positional accuracy must be above this value (meters)

acc_below

Positional accuracy must be below this value (meters)

d1

Fetch observations on or after a specific date: "YYYY-MM-DD"

d2

Fetch observations on or before a specific date: "YYYY-MM-DD"

created_d1

Fetch observations created on or after a specific date: "YYYY-MM-DD"

created_d2

Fetch observations created on or before a specific date: "YYYY-MM-DD"

created_on

Fetch observations created on a specific date: "YYYY-MM-DD"

observed_on

Fetch observations from a specific date: "YYYY-MM-DD"

unobserved_by_user_id

Fetch observations of taxa never observed by a user ID number

apply_project_rules_for

Fetch observations that match rules of "[project name]"

cs

Fetch observations of taxa with a specific conservation status code. When the place_id parameter is specified, the status code will be specific to that location

csa

Fetch observations of taxa with a conservation status code from a specific authority

csi

Fetch observations of taxa with a specific IUCN conservation status. Options are "LC", "NT", "VU", "EN", "CR", "EW", "EX"

geoprivacy

Fetch observations with this geoprivacy setting: "obscured", "obscured_private", "open", or "private

taxon_geoprivacy

Fetch observations with the specified most conservative geoprivacy applied by a conservation status: "obscured", "obscured_private", "open", or "private

hrank

Fetch observations with this taxon rank or lower: Example options are: "kingdom", "phylum", "order", "family", "genus", "species"

lrank

Fetch observations with this taxon rank or higher: Example options are: "kingdom", "phylum", "order", "family", "genus", "species"

id_above

Fetch observations above this ID number

id_below

Fetch observations below this ID number

identifications

Fetch observations with identifications where: "most_agree", "most_disagree", "some_agree"

lat

Fetch observations within a specified radius of this latitude (decimal degrees)

lng

Fetch observations within a specified radius of this longitude (decimal degrees)

radius

Fetch observations within a kilometer radius of specified variables lat and lng

nelat

Set northeast latitude (decimal degrees) of bounding box to fetch observations within

nelng

Set norteast longitude (decimal degrees) of bounding box to fetch observations within

swlat

Set southwest latitude (decimal degrees) of bounding box to fetch observations within

swlng

Set southwest longitude (decimal degrees) of bounding box to fetch observations within

list_id

Fetch taxon in list of IDs

not_in_project

Fetch observations that are not in a given project ID

not_matching_project_rules_for

Fetch observations that do not match the rules of a project ID

q

String search of observation properties that can be combined with paramter search_on

search_on

Properties to search on based on parameter q string query: "names", "tags", "description", "place"

quality_grade

Fetch observations of this quality grade: "casual", "needs_id", "research"

updated_since

String query for fetching observations updated since a given time

viewer_id

Fetch observations reviewed by a user ID

reviewed

Fetch observation that have ("true") or have no ("false") been reviewed by the user specified in the viewer_id parameter

locale

Specify locale preference for taxon common names

preferred_place_id

Specify place preference for regional common names

ttl

Specify the Cache-Control HTTP header in seconds

mappaple

Fetch observations that can show on map tiles: "true" or "false"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
Fetch all observations of Gastropoda (47114) for a user_id (473359):
df <- iNat(user_id = 473359, taxon_id = 47114)

Fetch all observations of flowering dicots for a project:
df <- iNat(project="golden-ears-provincial-park", taxon_id = 47124, term_id = 12, term_value_id = 13)

Fetch deer (Cervidae) observed on 2019-06-19
df <- iNat(taxon_id = 42158, observed_on = "2019-06-19")

Fetch all observations created for a project for the first 3 days of May 2019:
df <- iNat(project="bowerbird",created_d1="2019-05-01",created_d2="2019-05-03")

Fetch all observations of Felidae that have IUCN endangered status and are Research Grade:
df <- iNat(csi = "EN", taxon_id = 41944, quality_grade = "research")

Fetch all monarch butterfly observations within a specific bounding box of latitude and longitude:
df <- iNat(taxon_id = 48662, nelat = 40, nelng = -94, swlat = 39, swlng = -95)

Fetch all bird observations within a kilometer of the Empire State Building:
df <- iNat(taxon_id = 3, lat = 40.748424, lng = -73.985698, radius = 1)

pjhanly/iNatTools documentation built on Jan. 17, 2020, 12:54 p.m.