Creating a point map using categorical data

Categorical data is data that's divided into groups, such as age, gender, occupation, etc.

Creating a map of categorical data

To create a map of categorical data, you first need to plot the data points on a map. The previous page, Creating a point map, provides detailed instructions on how to add data points to a map.

Once you have created a point map, drag the column in your data that contains the different categories into the Point: Colour field of the visual. The map will automatically recolour the points based on the different categories in your data.

Using categorical data

  • Up to 12 different categories within your data are currently supported.

  • The only way to change the colour of categorical data (points and polygons) is by specifying the relevant colour hex code (for example, #cdf1f0) in the data and dragging the column of data that represents the colours to be used into the relevant Points / Features: Colour field in the visual. There is currently no way for you to customise the colours that are displayed for categories by default via the user interface.

  • Adding hex codes into your data to manipulate the point colours won’t update the category colours within the legend.

Varying the size of points

It’s quite common that you might want to vary the size (radius) of the points on a map to represent an increase in occurrence or density (for example, larger points represent a greater number of crimes at a location).

To do this, having plotted points on a map, drag a data column containing numeric data into the Points: Size field of the visual. Then click on the downward arrow of that field and select Count. Now the size of your points will be based off the total count of data points at the locations of your points.

A screenshot of the Points: Size field in the visualisation toolbar, showing Count of Crime Count in the dropdown box
Points: Size field in the visualisation toolbar in Power BI.

Varying point size in the OS Maps for Power BI Visual

  • You can combine the colouring of points based on categorical data and the size of points by another data attribute to represent two different variables in a single point within your data.

  • Point size only accepts a numeric data type.

See an example below showing a combination of categorical data (crime type) and point size variation (count of crime).

A Power BI visualisation showing categorical data used with point size variation. Image shows crime type data displayed on the map with point size variation used to show variance in the count of crime data
A Power BI visualisation showing categorical data used with point size variation.

Adding clickable point pop-ups

Additional information about a point can be displayed as a pop-up when a point on the map is clicked.

To add a pop-up to a point on the map, drag and drop data into the Points: Pop-ups field in the Visualization pane. Information included in the pop-up field should be shown when a user clicks on a point.

Point pop-ups

  • Multiple data columns can be shown under pop-ups.

  • By enabling point pop-ups based on different data attributes, points that appear in the same location can be filtered on the map (see screenshot below, where points can be filtered on the map by crime type data).

A screenshot of point data filtered by crime type within the visualisation in Power BI.
Point data filtered by crime type data.

Handling overlapping points on a map using pop-ups

It’s quite common that points on a map will overlap, making the data more difficult to understand. For example, when considering crime data, a shoplifting crime and a violent crime may have been recorded to the same x, y coordinates; however, one point will be plotted above the other and will therefore obscure some of the data.

By dragging a relevant column of data into the Point: Pop-ups field, you can click on a point on the map to reveal a pop-up and then paginate through all the underlying points that were originally obscured.

Below is an example of a pop-up where data representing crime type is being used to enable pagination of overlapping points; the pop-up shows there are five points representing different crime types in the same location:

An example of a pop-up showing data for multiple points on a map in the visual in Power BI.
An example of a pop-up showing data for multiple points on a map in the visual in Power BI.

Changing the colour of categorical data on a map

If you add a column of data containing textual data representing categories (for example, School, Library, Gym) into the Points: Colour field, the points on the map will automatically colour based on a default colour palette, and a legend will be generated on the map showing what colour represents what category (for example, School = Green).

A screenshot showing examples of colour coded data added to the visual. Image uses Crime type data to colour code different categories of crime
Examples of colour-coded data added to the visual in Power BI.

However, the colours can also be customised by specifying hex codes within the data. The only way to change the colour of categorical data (points and polygons) is by specifying the relevant colour hex code (for example, #cdf1f0) in the data and dragging the column of data that represents the colours to be used into the relevant Points / Features: Colour field in the visual. There is currently no way for you to to customise the colours that are displayed for categories by default via the user interface.

Generating a colour legend

Adding hex codes into your data to manipulate the point colours won’t generate the legend with the correct category colours.

Last updated

Was this helpful?