Skip to content

Commit 9eb14a2

Browse files
authored
Merge pull request #149 from SpatialPlanning/devel
Update to new GFW API
2 parents e31fabe + a4ad36a commit 9eb14a2

18 files changed

Lines changed: 83 additions & 83 deletions

R/splnr_get_gfw.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ splnr_get_gfw <- function(region,
129129

130130
# Determine the region ID based on the region_source and region type.
131131
if (region_source == "EEZ" & is.character(region)){
132-
region_id <- gfwr::get_region_id(region_name = region, region_source = region_source, key = key)$id
132+
region_id <- gfwr::gfw_region_id(region = region, region_source = region_source, key = key)$id
133133
} else if (region_source == "EEZ" & is.numeric(region)){
134134
# If region is numeric for EEZ, assume it's already an ID.
135135
region_id <- region
@@ -149,7 +149,7 @@ splnr_get_gfw <- function(region,
149149
get_data_for_range <- function(start_date, end_date, rid) {
150150

151151
# Call the gfwr::get_raster function to retrieve GFW raster data.
152-
data <- gfwr::get_raster(
152+
data <- gfwr::gfw_ais_fishing_hours(
153153
spatial_resolution = spat_res,
154154
temporal_resolution = temp_res,
155155
group_by = 'FLAGANDGEARTYPE', # Group by flag and geartype.

docs/articles/ClimateSmart.html

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/GlobalFishingWatch.html

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)