Skip to content

Join

When you have a geographical dataset and a tabular dataset that share a common field, you can join them to add the columns of the tabular dataset to the geographical dataset.

This association is made possible by matching the identifier values found in the geographic dataset with those found in the data table.

This operation is called a “join” (also used in GIS software or database management systems) and is performed here simply by choosing the name of the column containing identifier values in the dataset and in the geographic layer.

To ensure that this method works properly, the values taken by the identifiers, on the one hand for the geographic layer and on the other for the tabular dataset, must be unique.

Theoretical example

Example of attributes in a geographical dataset:

idname
BEBelgium
DEDeutschland
FRFrance
LULuxembourg
NLNederland

Example of attributes in a tabular dataset:

id_countrypop_density
DE231.5
LU218.9
NL432.0
FR118.6
BE373.1

By joining the tabular dataset to the geographical dataset using the id column of the geographical dataset and the id_country column of the tabular dataset, we obtain the following dataset:

idnamepop_density
BEBelgium373.1
DEDeutschland231.5
FRFrance118.6
LULuxembourg218.9
NLNederland432.0

The geographical dataset now contains the population density values from the tabular dataset, allowing for a cartographic representation of this value.

Accessing the join functionality

To access the join functionality, you must first have added a geographic dataset and a tabular dataset.

Then, in the Layer Manager, click on the “Join” button located on the tabular dataset to be joined to a geographic dataset.


Join button in the Layer ManagerJoin button in the Layer Manager

Parameters

In Magrit, the join is done from the tabular dataset to be joined to a geographical dataset. It is mandatory to fill in the following parameters:

  • The geographical layer to which to join the data,
  • The column of the geographical layer containing the identifier values,
  • The column of the tabular dataset containing the identifier values.

It is also possible to set the following optional parameters:

  • Non-case-sensitive identifier values,
  • Disregard diacritics, spaces and hyphens in identifier values,

Based on this information, the correspondences between the identifier values of the two datasets are established.

If no matches are found (or if multiple matches are found, i.e. if several ID values in the geographic dataset match the same ID value in the tabular dataset, or vice versa), the join cannot be performed.

If one or more correspondences are found, the tabular data is added to the corresponding entities of the geographical layer, based on the following options:

  • Possibility to select the columns to add to the geographical layer,
  • Possibility to add a prefix to the added columns,
  • Possibility to remove the entities from the geographical layer for which no correspondence has been found.

Join modal windowJoin modal window

Join modal window (with unmatched entities)Join modal window (with unmatched entities)

Released under the GNU General Public License v3.0 or later.