# Generate fishing effort report grouped by gear type, using existing regions (Russian EEZ) in CSV format (/docs/examples/report/report-example2)



> To get details of existing regions, check [Regions in the Reference data section](/docs/v3/general-api-doc/reference-data)

## GET [#get]

**Query parameters**

| Parameter             | Value                                 | Description                         |
| --------------------- | ------------------------------------- | ----------------------------------- |
| `spatial-resolution`  | `LOW`                                 | Low spatial resolution              |
| `temporal-resolution` | `MONTHLY`                             | Aggregate by month                  |
| `group-by`            | `GEARTYPE`                            | Group results by gear type          |
| `datasets[0]`         | `public-global-fishing-effort:latest` | AIS apparent fishing effort dataset |
| `date-range`          | `2022-01-01,2022-05-01`               | Filter to this time period          |
| `format`              | `CSV`                                 | Response format                     |
| `region-id`           | `5690`                                | Russian EEZ region id               |
| `region-dataset`      | `public-eez-areas`                    | Existing region dataset             |

**Request**

<Tabs items="['cURL', 'Python', 'R', 'JavaScript']">
  <Tab value="cURL">
    ```shell
    # Make sure to replace [TOKEN] with your API Access Token.
    curl --location -g --request GET 'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=MONTHLY&group-by=GEARTYPE&datasets[0]=public-global-fishing-effort:latest&date-range=2022-01-01,2022-05-01&format=CSV&region-id=5690&region-dataset=public-eez-areas' \
    --header 'Authorization: Bearer [TOKEN]' \
    --header 'Content-Type: application/json'
    ```
  </Tab>

  <Tab value="Python">
    ```python
    result = await gfw_client.fourwings.create_report(
        datasets=["public-global-fishing-effort:latest"],
        spatial_resolution="LOW",
        temporal_resolution="MONTHLY",
        group_by="GEARTYPE",
        start_date="2022-01-01",
        end_date="2022-05-01",
        region={"dataset": "public-eez-areas", "id": 5690},
    )
    ```
  </Tab>

  <Tab value="R">
    ```r
    gfw_ais_fishing_hours(
      spatial_resolution = "LOW",
      temporal_resolution = "MONTHLY",
      start_date = "2022-01-01",
      end_date = "2022-05-01",
      region = 5690,
      region_source = "EEZ",
      group_by = "GEARTYPE"
    )
    ```
  </Tab>

  <Tab value="JavaScript">
    ```js
    // Make sure to replace [TOKEN] with your API Access Token.
    const res = await fetch(
      'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=MONTHLY&group-by=GEARTYPE&datasets[0]=public-global-fishing-effort:latest&date-range=2022-01-01,2022-05-01&format=CSV&region-id=5690&region-dataset=public-eez-areas',
      { headers: { Authorization: 'Bearer [TOKEN]' } }
    )
    const data = await res.json()
    ```
  </Tab>
</Tabs>

## POST [#post]

**Query parameters**

| Parameter             | Value                                 | Description                         |
| --------------------- | ------------------------------------- | ----------------------------------- |
| `spatial-resolution`  | `LOW`                                 | Low spatial resolution              |
| `temporal-resolution` | `MONTHLY`                             | Aggregate by month                  |
| `group-by`            | `GEARTYPE`                            | Group results by gear type          |
| `datasets[0]`         | `public-global-fishing-effort:latest` | AIS apparent fishing effort dataset |
| `date-range`          | `2022-01-01,2022-05-01`               | Filter to this time period          |
| `format`              | `CSV`                                 | Response format                     |

**Request body**

| Field            | Value              | Description             |
| ---------------- | ------------------ | ----------------------- |
| `region.dataset` | `public-eez-areas` | Existing region dataset |
| `region.id`      | `5690`             | Russian EEZ region id   |

**Request**

<Tabs items="['cURL', 'Python', 'R', 'JavaScript']">
  <Tab value="cURL">
    ```shell
    # Make sure to replace [TOKEN] with your API Access Token.
    curl --location -g --request POST 'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=MONTHLY&group-by=GEARTYPE&datasets[0]=public-global-fishing-effort:latest&date-range=2022-01-01,2022-05-01&format=CSV' \
    --header 'Authorization: Bearer [TOKEN]' \
    --header 'Content-Type: application/json' \
    --output 'report-grouped.json' \
    --data-raw '{
        "region": {
            "dataset": "public-eez-areas",
            "id": 5690
        }
    }'
    ```
  </Tab>

  <Tab value="Python">
    ```python
    result = await gfw_client.fourwings.create_report(
        datasets=["public-global-fishing-effort:latest"],
        spatial_resolution="LOW",
        temporal_resolution="MONTHLY",
        group_by="GEARTYPE",
        start_date="2022-01-01",
        end_date="2022-05-01",
        region={"dataset": "public-eez-areas", "id": 5690},
    )
    ```
  </Tab>

  <Tab value="R">
    ```r
    gfw_ais_fishing_hours(
      spatial_resolution = "LOW",
      temporal_resolution = "MONTHLY",
      start_date = "2022-01-01",
      end_date = "2022-05-01",
      region = 5690,
      region_source = "EEZ",
      group_by = "GEARTYPE"
    )
    ```
  </Tab>

  <Tab value="JavaScript">
    ```js
    // Make sure to replace [TOKEN] with your API Access Token.
    const res = await fetch(
      'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=LOW&temporal-resolution=MONTHLY&group-by=GEARTYPE&datasets[0]=public-global-fishing-effort:latest&date-range=2022-01-01,2022-05-01&format=CSV',
      {
        method: 'POST',
        headers: {
          Authorization: 'Bearer [TOKEN]',
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          region: { dataset: 'public-eez-areas', id: 5690 },
        }),
      }
    )
    const data = await res.blob()
    ```
  </Tab>
</Tabs>

## Response [#response]
