Analytical styling for OS NGD data
A Lightning Talk
What is Geographic Data Visualisation?
Geographic Data Visualisation (or GeoDataViz) is the technique of presenting data visually. It doesn’t always have to be geographic data, but in our case at OS, it tends to have a spatial nature.
It is a broad term, encompassing maps but also animations, charts, 3D visuals and dashboards.
Much more on this topic can be found in our Guide to data visualisation
The benefits of GeoDataViz
So, why is GeoDataViz useful for you? Well, it can help you to…
Why is visualising analytical data helpful?
The OS National Geographic Database is really richly attributed, which makes it perfect for using analytically to solve complex problems across a huge range of sectors.
Whether you’re using the OS NGD in a GIS, manipulating it using something like PostGIS or Dbeaver, or coding with Python or R to pull out and interrogate the data – it can be very useful to be able to visualise what the data is showing you.
This will allow you to better communicate the message of your data – whether to yourself, to colleagues, stakeholders or customers.
Colour palettes for different data types
Data comes in different types, and in order to make the best sense of it, it’s important to use the right colour palette. It’s also good to think about avoiding clashing colours, and where possible to ensure that your colour palette is accessible for those with colour visual deficiency.
See the 3 types of data and example colour palettes for each below:
Labelling OS NGD data
Adding labels to your dataset is a really easy way to add geographical context, and easily demonstrate information which may have otherwise been overlooked e.g. location of a school or the location of a high street.
The OS NGD is an analytical dataset, which means it doesn’t have a separate labelling layer like ‘cartotext’ in the OS MasterMap Topography Layer.
However, it is possible to add labels to help with interpretation of OS NGD data. Many of the feature types within the OS NGD have a ‘name1_text’ attribute, which contains naming information that you can use to generate labels from.
In the image above we have also used the ‘topographic_area’ AND ‘topographic_line’ layers from OS MasterMap Topography, in the ‘Light’ style as a basemap.
Styling OS NGD labels
Now that you’ve generated some labels, you may see that they aren’t placed as well as they could be, or are
For Land Use -> Features -> Sites, the polygons are attributed as such that labels will only appear on every few buildings, as not to overwhelm your map with labels.
Here, we have also applied some styling to the labels so that they fit with our cartographic style of the map. This was:
Amending the font
Changing the font size
Adding a white halo to the text so that it has sufficient contrast from the backdrop
Setting the label placement to be centred in the middle of the Site polygon.
Labelling OS NGD data
Here we are using the Land Use -> Features -> Sites layer from the OS NGD, which shows the full extent of a site as one polygon. The labels for these polygons will sit roughly in the centre of the site, which may not always be where the building sits within the site. Therefore, there may be some instances where the label sits within the site, but not on top of the building feature it is referring to.
Adding labels to network data
We can do a similar thing to label some of the network datasets in the OS NGD.
Upon applying labels to the road network dataset, for example, you’ll see that these repeat very regularly and labels are applied to every segment of the network, which isn’t always helpful from a cartographic perspective.
We have tweaked the label style by doing the below to create the label style seen at the bottom on the right hand side:
Told it not to repeat labels within 50 millimeters on the same line feature
Changed the font and font size
Added a halo to our text to increase the contrast.
In the image above the labels have been generated from name1_text + set label spacing buffers + format font size and colours + add a halo
Styling OS NGD data on attribute values
By using the previously mentioned colour palettes to style OS NGD data, it becomes much easier to interpret. You can identify trends, outliers, and spatial patterns in the data much more easily than you may have if you hadn’t presented this analytical dataset in a visual way.
See the three below examples for evidence of this:
Left - OS NGD Building connectivity, styled with a Red-Amber-Green colour palette;
Centre - OS NGD Building use, styled with a qualitative colour palette
Right - OS NGD Transport Network: Road Link styled with a sequential colour palette
Links that may be useful:
This content has been developed from what was originally a Lightning Talk PowerPoint slide set. These slides are available to PSGA members to view and download from the PSGA members area of the OS website
Last updated