Using QGIS with Trap.NZ - Part 3 Connecting QGIS to Trap.nz

This is the final in 3 parts. This guide assumes you have been following along and have installed QGIS and added a basemap.
In here, I will connect QGIS to Trap NZ and start plotting some data onto the map.
I also create a heatmap showing the hot spots where a lot of catches have been made, but hit a wall when it comes to filtering this catch data.
If anybody can figure out how to do this, then do chip in - I may arrive at the solution myself in due course, at which point I will update the document or write another one.

https://drive.google.com/open?id=1wk6FNKQwkuIakJP3jQDdc-7KRJ-dqKhR

1 Like

You’re a legend David! There are a few others keen on on the map feeds so we’ll have a look at what we can do with regard to filtering.

Thank you @root, I’m learning the ways of GIS and this is my only use case at the moment so I’m prepared to accept my spells and incantations to make it do what I want are somewhat unrefined. I’m hoping that other people will be able to collaborate when I get stuck.

Kia ora David,
Well done on introducing QGIS into the mix and making it known in this forum.
I had some fantastic success with QGIS - plotting trap catch over the course of a year really shows hotspots and invasion vectors.
While I will not consider myself a seasoned geospatial expert nor a gifted programmer, the interface between QGIS and Python is simply brilliant. Most of my routine jobs are turned into python scripts, so they are done automatically.
Have a look at the time manager plugin from Anita Graser. Had some good success with this one using QGIS 2.x - but, as you mentioned, data filtering can be cumbersome, so I edit data as csv. Just found out they updated the plugin to be used with 3.x.
Cheers

1 Like

Thank you, I will take a look into that time manager plugin. - I’m also very interested to see month by month changes for catch locations.
I have been looking into scraping the data out of trap.nz for the projects I am attached to and into a local PostGIS database rather than csv - I am on a learning curve for PostgreSQL databases now too!

Time Manager looks like the tool for what I have in mind.


I’m interested in being able to make an animated heat map based on this which also uses Time Manager.

1 Like

Hi David,
Please be mindful of any postings pre 2017, as most of them are referring to QGIS 2.x, which in return uses Python 2.7, that is incompatible with Python 3 (altered syntax) and QGIS 3.x.
To mitigate I tend to run QGIS 2.x and QGIS 3.x parallel on my machine, until I can eventually migrate 100% to 3.x. Most of my animations were done with 2.x as most plug ins have not been updated to the 3.x LTS yet.
Thank you for the link btw, it looks very interesting.
Cheers

I have made a small update to the linked document to clarify the credentials that you need to give to the trap.nz feed as follows:

:bulb: TIP: The username is not your email address, (although trap.nz website lets you log in with your email address as well), you will need to use the username that you gave when you signed up to trap.nz, you can find this by clicking on “My Account” at the top of the screen in trap.nz website after you sign in, you will see your username in large red letters at the top left of the screen.

Please note that the above feed has been deprecated in favour of one that’s a little more private and secure.

Please refer to the following document for an updated process:
https://drive.google.com/file/d/1UaJkKZ-NVz9jYf9e6mJjMnJS_Z6CUyAk/view?usp=sharing

Many thanks to David Alderman for the original documentation.

1 Like

Thank you @scottw I will take another look at that replacement feed.
I had a go with it a few months back and it would give the positions of points of interest on the map, but not any data behind each point if interest such as the number of catches, which species and dates.

I am extremely interested in getting out tabular data for multiple projects - I know I can grab the csv file from the reports on the website, but it takes 10 to 15 minutes for a full history to be compiled for all the projects I am looking into. I really need to be able to get the data incrementally with some backfill (If I grab a batch on the first of the month, there will inevitably be some data from the previous month that hasnt quite been added yet so I would want to grab the last two months)
From the data, I would like to identify which traps have reported in recently and which traps we have not heard from in a long time as well as general statistics for each month.
It is quite laborious to set up the filters in the web reports each time I need to grab the csv manually so I was hoping there might be a way that I could just ask an API feed to send me what I need on demand so I can automate it.

1 Like

We are thinking the same thing, @david.alderman. I want to pull in the trap and baitstation date last visited information as, say, CSV, so I can build automatically self-updating integrated management reports (maps with green, yellow and red dots mostly) that include this predator control data, but also include other management stuff local to our farm, like condition and most recent inspection of gates, culverts, paddocks, etc. Set the data free, eh?