Skip to main content

30 Days of Maps Day 16 - Choropleth

· 3 min read
James Dales
Co-founder of Tekantis

Saturday brings us to day 16 of the #30DayMapChallenge and today's theme is "Choropleth" - Classic choropleth map. Use color to show data variation across regions. This simple but effective technique is a staple for showing thematic differences.

Choropleth maps have been one of the main uses of Icon Map Pro and I've already created a drill-down choropleth map on day 12 so I'm adding something extra to today's challenge. Often choropleth maps are used as context for other information shown on a map. In today's example I'm using the Index of Multiple Deprivation for England as context to show whether doctors surgeries and dentists are located in deprived areas. These are two separate datasets using different geography - the doctors and dentists are point data identified by longitude and latitude coordinates, and the deprivation data is at Lower Super Output Area (LSOA) level. There 33,755 LSOAs in England, so it's not possible to create an interactive choropleth map for England using Power BI's native visuals.

Two separate datasets in one visual are also a challenge for Power BI - the underlying architecture doesn't allow a single visual to be fed by more than one set of related tables. We can get around this by creating complex many to many relationships to ensure that filtering etc works as required, but it is not easy to get right. Icon Map Pro offers an additional approach with its reference layers, allowing the context information to be stored within the shape layer, and then the point data simply fed into the visual as a data layer. The great part is we can still conditionally format and filter the reference layer in line with the point data, even though it's not a normal data bound layer.

I've download the LSOAs for england from the Office for National Statistic's Geoportal, and joined it to the Index of Multiple Deprivation data using QGIS. For each LSOA, I've added a property to hold the deprivation index for each of the deprivation domains. I've then uploaded this file as an Esri Shapefile into Icon Map Pro. I can then specify gradient (or rule based) formatting within Icon Map Pro to colour the LSOAs based on the deprivation value. Which property to lookup up this value can also be set using Power BI conditional formatting, which I've driven from a Power BI slicer, to allow you to pick which deprivation domain to view. In addition I'm also dynamically filtering the LSOAs based on a region slicer, which also filters the doctors & dentists data.

The doctors and dentists data comes from the Care Quality Commission's Open Data Portal. I've then used PowerQuery to join the postcode from the CQC data to the National Statistics Postcode Lookup to get the longitude and latitude for each provider. I've limited to providers to just doctors and dentists for the challenge, but there's still 20 thousand of them. This is also the first public outing of Icon Map Pro's forthcoming clustering capability (a highly requested feature). Finally I've added tooltips to show the provider's name, services and specialisms.

The downside to this is needing to do a spatial join to add the deprivation data to the shape file - but we will be creating tooling to make this an easy process soon.

If you'd like to see how the report was built, you can download it here.