Create a Predominance Map in Just
30 Minutes
A predominance map helps represent geographical patterns by
comparing multiple attributes (fields) from your data. By showing differences
in value between many attributes, we gain new insights about how data
might be grouped geographically.
In this guide we’ll show you how
to create a predominance map in Azimap.
We’ll use a working example, creating a map of election results in UK by
constituency.
Time to complete: 35 mins.
Tools required - LibreOffice Calc
(download before beginning), Azimap
Contents
1. Getting started
1.1 Download and extract files
1.2 Download LibreOffice Calc
2. Editing
the dataset
2.1 Add
attributes using LibreOffice Calc
2.1.1 Decide
on your new attributes
2.1.2 Define
column structure
2.1.3 Formula
for WINNER column
2.1.4 Formula
for NUMVOTES column
2.1.5 Formula
for PERCVOTES column
2.1.6 Final
edits to dataset
3.
Creating your
predominance map
3.1 Create a new dataset
3.2 Import your data
3.3 Create your map
3.4 Style your data
3.5 Set up layer interactivity ( Optional)
1. Getting started
1.1. Download and extract shape file
Download the following sample files: Azimap_Election_2024_Complete[1] and extract the zip file to a folder.
1.2.
Download LibreOffice Calc
Download this software now if you
still need to. We’ll be using it to
create some extra attributes (columns) and perform some calculations on our
dataset.
2. Editing the dataset
2.1. Add attributes using LibreOffice
Open the .dbf file
"Azimap_Election_2024_Complete.dbf" with LibreOffice Calc.
Accept the default character set.

2.1.1.
Decide on your new attributes
We’re going to add three new
columns (attributes) to the .dbf file.
This is because while we have all the raw data, we want to use the data
to create attributes (columns) that will translate easily onto a map.
In this case, we’re going to
create the following columns:
- Winner - the resultant
elected party
- NumVotes - the number of
votes the winner achieved
- PercVotes - the percentage
of the votes cast the winner achieved
2.1.2.
Define column structure
We now need to define the column
structure, so each new column header should be set as:
WINNER,C,254 - varchar, 254 characters
NUMVOTES,N,10 - number 10 digits
PERCVOTES,N,10 - number 10 digits
Your new column headers will look
something like this:

NB. Care must be taken that the
data inserted in the created columns matches the above structure.
2.1.3.
Formula for WINNER column
In the WINNER column
ROW 2, use the formula:
=INDEX($G$1:$S$1,1,MATCH(MAX(G2:S2),G2:S2,0))
Here we are trying to return the
column header to the cell of the highest value in the range. To do this we
can apply a combination of INDEX, MATCH and MAX functions to get the
result.
We want to make the index range
static rather than relative for this so select the first:
and press F4 which will make it
static, like this:
=INDEX($I$1:$X$1,0,MATCH(MAX(I2:X2),I2:X2,0))
2.1.4.
Formula for NUMVOTES column
In the NUMVOTES column ROW
2 use the formula:
This will select the highest
number in the range.
2.1.5.
Formula for PERCVOTES column
In the PERCVOTES column ROW
2 use the formula
Right-click on the PERCVOTES
column and choose FORMAT CELLS. Set the
column category to PERCENT and click OK.
Next, select all rows in the
three new columns, except the headers. Use CTRL-D to copy the formula
from the 1st row selected into all the other rows.

2.1.6.
Final edits to dataset
We’re nearly finished with the data work. Check that the values in the WINNER column display only the party abbreviation, such as LAB, CON, DUP or SF. The supplied DBF uses clean field names, so no further changes to the headings should be necessary. LibreOffice may display DBF field information such as LAB,N,10.
To return only the party abbreviation, the REGEX function removes the comma and the field information appearing after it.
=REGEX(INDEX($G$1:$S$1,1,MATCH(MAX(G2:S2),G2:S2,0)),",.*","")
Press Enter.
Check that the result now says something like LAB instead of LAB,N,10.
Select cells T2:T651.
Press Ctrl+D to copy the corrected formula down.
If LibreOffice rejects the formula, use the semicolon version:
=REGEX(INDEX($G$1:$S$1;1;MATCH(MAX(G2:S2);G2:S2;0));",.*";"")
Check the WINNER results
Check that the WINNER column displays only the party abbreviation, such as LAB, CON, DUP or SF. The updated formula removes the additional DBF structure information automatically. Do not change the party-column headers.
Save your amended file as a dBASE
file (default)

That's it, all data preparation is
complete – now let's make a map.
3. Creating your predominance map
3.1. Create a new data set
Click on Dataset section and select Create Dataset.
This will open up the first page of the
map creation wizard.

Click the 'Create dataset'
button to start creating a new dataset.

3.2 Import your Dataset
Click on Import.

Click the 'Select files'
button to choose a dataset file for upload and click Next.

Confirm your Import Options and click Next.

3.3
Create your Map
Click the 'Create map from
selected datasets' button to proceed with creating a map using the selected
dataset.

Your map has been created!!

3.4 Style your data
The layer will load with the default polygon layer style (black outline, grey polygon).

Click the 'Add new style'
button in the Styler panel to create a new style for the map layer.

Click the 'NEW STYLE NAME' field to enter a name for the new style.
Click the 'Create' button
to finalize the new style named 'PredominanceTest'.

Click the 'Add' button in
the Styler panel to create a new style.

Click the 'Polygon
Thematic' option in the Styler panel to apply the thematic styling to the map.

Click the 'winner' option
in the Column dropdown to set it as the data field for styling.

Change the style options as you see fit - I have set stroke width to 0.1 .

Next, click on the 2nd tab DATA RANGE to set the colours for your autogen style.

Click on the colour or enter your hex code to set to your desired colours.
After you have entered your desired colours, click the 'Generate' button to apply the current map layer settings.

3.5 Set up Layer Interactivity (Optional)
Click the 'Adjust popup
config' button to modify the popup settings.

Click on the HOVER tab.

Choose the switch for the data you want to display in your interactive hover popup - I have chosen pcon24nm, winner and numvotes.
Click Save Changes

Now to see your new interactive popup, hover over any polygon.

Thanks for reading the guide and we hope you enjoy creating predominance
maps with Azimap.
If you haven't signed up yet go to the Azimap website and
click REGISTER.