Trap.NZ project data feeds

Trap.NZ has a few data feeds that project owners can optionally expose to use their project data outside of the Trap.NZ website or app.

These feeds do not require authentication to access, so for privacy, these data feeds are opt-in and disabled by default. To enable them the project owner needs to edit their project on the Trap.NZ website and tick the Publish summary data? checkbox.

Next, you'll need to find your project ID. View your project on the Trap.NZ website and take a look at the URL. It will look like https://www.trap.nz/node/1234. In this case 1234 would be your project ID. In the following examples replace [project-id] with this number.

Once this setting is enabled, the following feeds are available:

Project information

Combined general information

https://www.trap.nz/project/[project-id]/info.json

Provides a GeoJSON feed of the project data that contains the project location as both a polygon and a centroid point, along with the project name, description and links.

Example output:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              174.95154619217,
              -40.982457501261
            ],
            [
              174.95549440384,
              -40.984336514428
            ],
            [
              174.95596647263,
              -40.987316908262
            ],
            [
              174.95103120804,
              -40.990426740822
            ],
            [
              174.94669675827,
              -40.989001419105
            ],
            [
              174.95154619217,
              -40.982457501261
            ]
          ]
        ]
      },
      "properties": {
        "name": "Demo Project",
        "description": "Demo project description",
        "Links": "<a href=\"http:\/\/www.trap.nz\" target=\"_blank\">Demo link<\/a>",
        "Centroid": "POINT (174.95174152342 -40.986706538364)"
      }
    }
  ]
}

Project area shape

https://www.trap.nz/project/[project-id]/shape.json

Same as the combined general information, but without the links or centroid point.

Example output:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              174.95154619217,
              -40.982457501261
            ],
            [
              174.95549440384,
              -40.984336514428
            ],
            [
              174.95596647263,
              -40.987316908262
            ],
            [
              174.95103120804,
              -40.990426740822
            ],
            [
              174.94669675827,
              -40.989001419105
            ],
            [
              174.95154619217,
              -40.982457501261
            ]
          ]
        ]
      },
      "properties": {
        "name": "Demo Project",
        "description": "Demo project description"
      }
    }
  ]
}

Project centroid

https://www.trap.nz/project/[project-id]/centroid.json

Same as the combined general information, but without the links or area shape.

Example output:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          174.95174152342,
          -40.986706538364
        ]
      },
      "properties": {
        "name": "Demo Project",
        "description": "Demo project description"
      }
    }
  ]
}

Kill count summary

https://www.trap.nz/project/[project-id]/killcount.json

Provides a json feed of the recent project kill count data, including the current number of traps and bait stations in the project, and the total number of strikes for each species and family, broken down by the last 7 days, 30 days, the last 12 months and total history.

By default the species list is summarised using the Predator Free 2050 top 4 targeted species, but projects can choose to display their own top 5 species list in their project settings.

Example output:

{
   "group_count":1,
   "record_count":11114312,
   "traps":196,
   "baitstations":581,
   "monitoring_stations":60,
   "installations":837,
   "catches":{
      "year":{
         "total":697,
         "species":{
            "Mustelid":134,
            "Rat":254,
            "Other":99,
            "Possum":101,
            "Mouse":13,
            "Hedgehog":96
         }
      },
      "month":{
         "total":54,
         "species":{
            "Mustelid":11,
            "Rat":29,
            "Other":2,
            "Possum":8,
            "Mouse":2,
            "Hedgehog":2
         }
      },
      "week":{
         "total":10,
         "species":{
            "Mustelid":1,
            "Rat":6,
            "Other":1,
            "Mouse":1,
            "Hedgehog":1
         }
      },
      "all":{
         "total":1298,
         "species":{
            "Rat":450,
            "Possum":331,
            "Mustelid":183,
            "Hedgehog":142,
            "Mouse":50,
            "Other":142
         }
      }
   }
}