Description Usage Arguments Details Value Author(s) References Examples
View source: R/FUNCTION_boatFun.R
This function creates a raster stack of year-month total fishing days from original Global Fishing Watch hourly data, in csv.
1 2 |
orgLs |
Vector of path to original GFW daily csv files |
yrMon |
Vector of year-mon, with the same length as orgLs |
type |
Character of gear type to analyse. Defaults to NULL, equals to all fishing vessels. Other options can be "drifting_longlines", "purse_seines" |
impRes |
Numeric, in decimal degrees. Resolution of imput data. Defaults to 0.01 degree. |
ncores |
Numeric. Number of cores to use for function to run in parallel processing. Defaults to 1 core (no parallel). |
res |
Numeric, in decimal degrees. Resolution of export data. Defaults to 1 degree. |
ext |
Matrix of extent of output raster, in decimal degrees. Defaults to c(-180,180,-90,90) |
This function can be time-consuming and requires high memory capacity. We advice to use up to 75 percent of available cores and/or break data into chunks whenever possible. Further vessel types can be found on the original GFW data, and can also be used with this function.
Returns a raster stack comprised by each year-month raster
Marisa Vedor, Ivo da Costa, Nuno Queiroz
https://globalfishingwatch.org/;
KROODSMA, David A., et al. Tracking the global footprint of fisheries. Science, 2018, 359.6378: 904-908.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import <- '~/r_scripts/1b_boats/examples/'
# List daily 0.01 degree data
orgLs <- list.files(import, '.csv', full.names = TRUE)
# Get year and month of data
yrMonLs <- lapply(strsplit(basename(orgLs), '-'), '[', c(1,2))
yrMonLs <- lapply(yrMonLs, paste, collapse = '-')
yrMonLs <- unlist(yrMonLs)
# Create a raster with sum of boats in each year-month
rstStk <- boatFun(orgLs = orgLs,
yrMon = yrMonLs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.