Global Fishing Watch API
API v34Wings - Map Visualization

Generate Bins

Generate bins of the underlying data at a given zoom level, for example to build a color ramp.

Generate bins of inputs to know the data

You can use this endpoint for example to create a color ramp of the data.

Examples using AIS apparent fishing effort:

  • EXAMPLE 1 - Get AIS apparent fishing effort bins for zoom 1 in a daily interval

Examples using SAR (Synthetic-aperture radar) vessel detections:

  • EXAMPLE 2 - Get SAR vessel detections bins for zoom 2 in a hourly interval

Examples using AIS Vessel Presence:

  • EXAMPLE 3 - Get AIS vessel presence bins for zoom 1 in a daily interval

Get bins

GET
/v3/4wings/bins/{z}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

In: header

Path Parameters

z*number

Zoom level (from 0 to 12)

Query Parameters

temporal-aggregation?boolean

Aggregates temporarily the data in the tile

num-bins?number

Number of bins or buckets that you would like

interval?string

Tiles are available at several time resolutions (hourly, daily and 10 days), it means one frame every one hour, one day or 10 days. For each resolution, the the max displayable length items:

  • 1 hour: 20 days
  • 1 day: 1 year
  • 10 days: several years depending on the dataset for AIS Fishing effort it starts in 2012

Value in

  • "10DAYS"
  • "DAY"
  • "HOUR"
  • "MONTH"
  • "YEAR"
datasets[0]*string

Specify the datasets that will be used to create the style. You can learn more about which are the possible datasets here. The parameters should be defined using an index, in case only one dataset is going to be sent: ?dataset[0]=xxxxx, in case of multiple datasets: ?dataset[0]=xxxxx&dataset[1]=yyyyy

filters[0]?string

Filters are applied to the dataset parameter with the corresponding index. For example if we want to apply a filter to dataset[0], we should apply the filter attributes to filter[0].For AIS fishing effort, the possible filters are: flag, geartype

date-range?string

Start date and end date to filter the data

vessel-groups[0]?string

Vessel group ids to filter (separated by comma). Vessel groups applied at dataset with index 0. At the same as datasets, this query param could be send with different index to apply filters to other datasets.

curl -X GET "https://example.com/v3/4wings/bins/0?temporal-aggregation=true&num-bins=10&interval=10DAYS&datasets%5B0%5D=public-global-fishing-effort%3Alatest&filters%5B0%5D=flag+in+%28%27ESP%27%29&date-range=2021-01-01%2C2021-03-01&vessel-groups%5B0%5D=1%2C2"
{  "entries": [    [      0,      143.92472222222221,      648.9243889980555,      1669.4305555555566,      2933.968777777777,      5242.189444444445,      "…"    ]  ],  "limit": 0,  "metadata": {},  "nextOffset": 0,  "offset": 0,  "total": 0}

On this page