20 minutes
We’ve laid the groundwork, and now we’re ready to join our two datasets together!
The instructions below are written for the water beetle example data, but we encourage you to do this exercise on your own field data if you can, adapting the instructions as you go. You might find it useful to run through the exercise with the example data first, to get familiar with the process
Both of our example files have a column called ‘WPT’, which contains the waypoint name saved on the GPS. This allows us to match water beetle survey records to the location at which they were collected
Note that it’s possible to join the layers in either direction, choosing either file as the source or destination. The consequences would be as follows:
The water beetle dataset contains multiple records for each survey location, so we are going to use the second approach today, adding location coordinates (Latitude & Longitude) from our source layer of waypoints to our destination layer of beetle survey data
- Right-click on ‘waterbeetles_fieldobs.csv’ >
Properties
- Click
Join
in the left-hand list to open the Join tab- Click the
green '+'
at the bottom of the dialogue box to add a new join- Select the
Join layer
; the source layer which contains the data you want to add to your destination layer; in this case, it’s the geoJSON of waypoints- Specify the
Join field
- the column of unique location identifiers (WPT) in your source layer- Specify the
Target field
- the column of unique identifiers (WPT) in your destination layer- Under
Joined fields
, select which fields you want to join from your source to your destination layer - click the checkboxes beside Latitude and Longitude- Under
Custom field name prefix
, choose whether to prepend a phrase indicating from which dataset these records were joined. With our example dataset, you can delete this prefix to keep the column names short- Click
OK
andApply
to apply the join
- Check the join worked correctly by opening the attribute table of the water beetle field obs layer - right-click >
Open Attribute Table
)- Do Latitude and Longitude now appear in each record?
Properties
Join
in the left-hand list to open the Join tabgreen '+'
at the bottom of the dialogue box to add a new joinJoin layer
; the source layer which contains the data you want to add to your destination layer; in this case, it’s the geoJSON of waypointsJoin field
- the column of unique location identifiers (WPT) in your source layerTarget field
- the column of unique identifiers (WPT) in your destination layerJoined fields
, select which fields you want to join from your source to your destination layer - click the checkboxes beside Latitude and LongitudeCustom field name prefix
, choose whether to prepend a phrase indicating from which dataset these records were joined. With our example dataset, you can delete this prefix to keep the column names shortApply
to apply the join, and OK
to close the dialogue boxOpen Attribute Table
)