The get_gfwData
function recover the data of Global Fishing Watch and returns it as a sf object.
Source: R/splnr_get_gfw.R
splnr_get_gfw.Rd
The possibilities offered by this function are explained in vignette("GlobalFishingWatch")
Usage
splnr_get_gfw(
region,
start_date,
end_date,
temp_res,
spat_res = "LOW",
region_source = "EEZ",
key = gfwr::gfw_auth(),
cCRS = "EPSG:4326",
compress = FALSE
)
Arguments
- region
Region studied (character) or a geojson shape to filter raster
- start_date
Start date (waited format : "%Y-%m-%d").
- end_date
End date (waited format : "%Y-%m-%d").
- temp_res
Temporal resolution ("daily","monthly","yearly").
- spat_res
Spatial resolution ("low" for 0.1 degree, "high" for 0.01 degree).
- region_source
source of the region ('eez','mpa', 'rfmo' or 'user_json')
- key
Token for GFW API (see details GlobalFishingWatch vignette).
- cCRS
The crs to which the sf will be returned (default = "EPSG:4326").
- compress
Binary operator to compress (aggregate) the data per coordinates (default = FALSE).
Details
We have the same parameters than the get_raster
function, plus cCRS
which is the crs for the sf_modification
Different possible values can be combined and are :
Time Range
,Flag
,Geartype
.
(A combination can be : c('Time Range','Geartype'), if you want to get the sum of fishing hours per date and geartype, for example you want to display the drifting longline fishing in a specific year)
Notes :
For the moment we are limited to the EEZs of each region, but we can potentially restrict the working area to specific MPAs.
Days indicated in the__
start_date
andend_date
__variables are included in the data recovery.
The code takes several parameters described below and return an sf object with gfw data aggregated or not (param compress)