Learn R Programming

rapr (version 1.1.3)

get_rap_table: Query RAP Tabular Data

Description

Retrieves remotely sensed production or cover estimates from the Rangeland Analysis Platform (RAP) using the tabular data API endpoints. This function supports querying one or more spatial features (points, lines, or polygons) provided as a terra SpatVector object, or any spatial object that can be converted with terra::vect(). See Details for the products available.

get_rap_production16day_table() is depreciated, please use get_rap_table(product="production16day") instead.

Usage

get_rap_table(
  aoi,
  years = NULL,
  product,
  version = "V3",
  mask = TRUE,
  nodata_flag = NA_real_
)

get_rap_production16day_table( aoi, years = NULL, mask = TRUE, nodata_flag = NA_real_, ... )

Value

A data.frame with requested time-series data by year or 16-day production period. In addition to the columns described in Details above, all products include columns for "year" (production estimate year) and "feature" (feature ID, row number from aoi). Units are % cover for fractional cover and lbs / acre for production.

Arguments

aoi

Area of Interest. A SpatVector object, or any spatial object that can be converted with terra::vect(). The AOI coordinates will be transformed to WGS84 longitude latitude ("EPSG:4326"). The AOI can be specified using point, line and polygon geometries. Each unique feature will be passed separately to the API. The result feature column contains the row index of the input feature from aoi.

years

integer. Optional. Numeric year or vector of years (1986 to last full year). Default: NULL returns all available years.

product

Target data: "cover", "coverMeteorology", "production", or "production16day".

version

Target version: "V3".

mask

logical. Exclude cropland, development, and water? Default: TRUE.

nodata_flag

numeric. Value to use for missing data. The API encodes "NODATA" as -99. Default: NA_real_ replaces -99 with NA.

...

allows backward compatibility with year argument in depreciated version of get_rap_production16day_table().

Details

For each feature - year combination, a separate request is made to the RAP API, and results are returned as a combined data.frame. In the special case of (years=NULL) default, all available years are returned in a single query.

For more information on the API and data products, see the RAP API documentation: https://rangelands.app/support/71-api-documentation

Products Overview

You can query several Landsat derived biomass, cover, and meteorological products from 1986 to present:

  • "cover" -- yearly fractional cover, including:

    • "AFG" (Annual Forb and Grass cover)

    • "PFG" (Perennial Forb and Grass cover)

    • "SHR" (Shrub cover)

    • "TRE" (Tree cover)

    • "LTR" (Litter cover)

    • "BGR" (Bare Ground cover)

  • "coverMeteorology" -- the same data provided by "cover" above, plus:

    • "annualTemp" (Annual average temperature in degrees Fahrenheit)

    • "annualPrecip" (Annual total precipitation in inches)

  • "production" -- annual production, including:

    • "AFG" (Annual Forb and Grass production)

    • "PFG" (Perennial Forb and Grass production)

    • "HER" (Herbaceous production)

  • "production16day" -- 16-day production, including:

    • "date" (production estimate date)

    • "doy" (production estimate Julian day of year)

    • "AFG" (Annual Forb and Grass production)

    • "PFG" (Perennial Forb and Grass production)

    • "HER" (Herbaceous production)