4wings report API - return vessel record id
closed
Jorge Cornejo
Does anyone know why, when I pull the squid jigger data for the IATTC area, I get different values than those shown on the map?
For example, for 2011 in the IATTC area, the map shows 210 vessels, while gfwR (
gfw_ais_fishing_hours
) results 197 unique vessels.```code_rfmo <- gfw_region_id(region_name = "IATTC", region_source = "RFMO")
fh2025 <- gfw_ais_fishing_hours(
spatial_resolution = "HIGH",
temporal_resolution = "DAILY",
group_by = "VESSEL_ID",
start_date = "2021-01-01",
end_date = "2021-12-31",
region = gfw_region_id(region_name = "IATTC", region_source = "RFMO")$id[1],
region_source = "RFMO")
fh_squid_2025 <- fh2025 %>%
filter(
Gear Type
%in% c("SQUID_JIGGER"))length(unique(fh_squid_2025$
Vessel ID
))```Created by Gisela Morinigo
G
Gisela Morinigo
marked this post as
closed
API and MAp are returning the same values, so gfwr might be grouping some results. On the API side, the flow is 4wings report and then vessel API based on the vessel id to get the vessel record id. We won't add more details on the 4wings report API at this moment to avoid adding more time to return a response. Thanks!!
G
Gisela Morinigo
I checked it in the API directly and I get the same results 210. There are some differences between the Map request and your request like end date (see this loom for details and also to learn how to see the API request that the Map is sending).
The total number that appears in the Map and API is 210 vessel ids. On the R package, there might be some grouping.