inat_retrieve: Retrieve iNaturalist observations on USFWS properties

Description Usage Arguments Value See Also Examples

View source: R/inat_retrieve.R

Description

The observations can also be restricted to a single iNaturalist project, which is associated with a "slug", usually in the form of the project name as a single lower case string with words seperated by hyphens. For instance, the default "USFWS National Wildlife Refuge System" project has a slug of "usfws-national-wildlife-refuge-system". The slug can be extracted from the for the project. The USFWS NWRS project, for example, resides at http://www.inaturalist.org/projects/usfws-national-wildlife-refuge-system

Usage

1
2
3
4
inat_retrieve(refuge = NULL,
  inat_proj = "usfws-national-wildlife-refuge-system", taxon_name = NULL,
  d1 = NULL, d2 = NULL, since_date = NULL, multipart = FALSE,
  verbose = TRUE)

Arguments

refuge

character scalar or vector indicating USFWS properties on which to retrieve iNaturalist observations. It is strongly advised that the input for this parameter result from running find_refuges to avoid potential mismatches. See examples. By default, all 570+ USFWS properties with boundaries in iNaturalist are used.

inat_proj

character scalar of an iNaturalist project as an iNaturalist slug or group ID. Default is to retrieve all records on the property associated with the USFWS National Wildlife Refuge System project ("usfws-national-wildlife-refuge-system"; http://www.inaturalist.org/projects/usfws-national-wildlife-refuge-system). Another potentially useful option is to retrieve all available iNaturalist records on the property using (inat_proj = NULL)

taxon_name

character scalar. Retrieve only observations associated with taxon_name. This also retrieves descendant taxa. Note if taxon_name is ambiguous and matches multiple taxa, no observations may be retrieved.

d1

First date of a date range as string in the form yyyy-mm-dd (e.g. "2017-07-01"). Specifying only d1 returns all records on and after d1.

d2

Last date of a date range as string in the form yyyy-mm-dd (e.g. "2017-07-31"). Specifying only d2 returns all records on and before d2.

since_date

string with ISO 8601 datetime (e.g. "2017-07-04" or "2017-07-04T13:40:13-05:00"). Only records added or updated on iNaturalist after this date will be returned. Primarily intended for internals use from inat_update.

multipart

logical (default FALSE) indicating whether the current retrieval is part of multiple retrievals to obtain > 10000 records. If TRUE, the current system time is recorded as the the query_dt attribute of the resulting fwsinat object rather than d2, if specified.

verbose

logical (default TRUE); print informative messages? If not, a progress bar is supplied.

Value

fwsinat object (essentially a data.frame with a few additional attributes) of iNaturalist observations associated with the supplied refuge(s) and inat_proj, if any, and joined, when possible, with ITIS (http://www.itis.gov) information

See Also

inat_update for updating a previous iNaturalist data retrieval

inat_export for exporting an iNaturalist data retrieval

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Default is to retrieve records for all available USFWS properties from the USFWS
# National Wildlife Refuge System projects
fws <- inat_retrieve()
fws_july17 <- inat_retrieve(d1 = "2017-07-01", d2 = "2017-07-31")

# But it works with other projects too
bon <- find_refuges("bon secour")
bs <- inat_retrieve(bon, "bon-secour-national-wildlife-refuge-bioblitz")

# Or get all available iNaturalist observations on the property
bon <- find_refuges("bon secour")
bs_all <- inat_retrieve(bon, inat_proj = NULL)

## End(Not run)

adamdsmith/fwsinat documentation built on May 29, 2019, 2:10 p.m.