R/get_raster.R
get_raster.Rd
Base function to get raster from API and convert response to data frame
get_raster(
spatial_resolution = NULL,
temporal_resolution = NULL,
group_by = NULL,
filter_by = NULL,
date_range = NULL,
region = NULL,
region_source = NULL,
key = gfw_auth()
)
raster spatial resolution. Can be "low" = 0.1 degree or "high" = 0.01 degree
raster temporal resolution. Can be 'daily','monthly','yearly'.
parameter to group by. Can be 'vessel_id', 'flag', 'gearType', 'flagAndGearType'
parameter to filter by.
Start and end of date range for raster (must be one year or less)
geojson shape to filter raster or GFW region code (such as an EEZ code). See details about geojson formatting.
source of the region ('eez','mpa', 'rfmo' or 'user_json')
Authorization token. Can be obtained with gfw_auth function
The user-defined geojson has to be surrounded by a geojson tag, that can be created using a simple paste:
If you have an sf shapefile, you can also use function sf_to_geojson()
to obtain the correctly-formatted geojson.