One of the best things about Tableau is that there is no limit to the type of visualizations you can produce. This is particularly true with maps data.
Even though Tableau is constantly expanding its capability with maps and maps data, sometimes it takes a few extra steps to get to the geographic data you need.
In the wake of the Brexit vote, many of us here at Tableau were interested in exploring the raw JSON data that was generated showing voting results by wards/electoral divisions and Parliament constituencies.
However, even though Tableau offers a lot of data options (with more to come!), UK electoral divisions are not currently one of them. Never fear—there is an easy three-step process you can follow to create your own custom-geography visualization in Tableau!
How to Create a Custom-Geography Viz
The steps to create this viz are as easy as 1-2-3:
Our team member Nick Hara kicked off the data-exploration effort by extracting the raw JSON file using Alteryx and Excel. After we prepped the data, the GSS Code (a unique nine-character alphanumeric administrative code) was available as a join field.
From there, I gathered geographic data sets from open-source data vendors. One data source came from the UK’s Ordnance Survey site, OS Data, where anybody can download the electoral divisions for Wales, Scotland, and England for free after signing into the website. I used OpenDataNI to obtain the 18 Parliamentary constituencies of Northern Ireland.
Once I gathered the different data sets, I simplified and merged the geographic data files to produce a seamless shapefile output. Then the data sets were loaded into my colleague Mary Solbrig’s extremely-handy TabShapeR tool to transform them into Tableau-readable geographic files.
Finally, since all of the geographic data sources contained the GSS code, the data easily joined to the processed JSON file that Nick had provided.
After that, it was time to visualize our voting data! Mary added some tooltips (and a handy side map to show the small-but-significant overseas territory of Gibraltar) and PRESTO—a custom-designed geographical viz was born!
Share Your Ideas
Custom-geography visualizations are an extremely popular feature in Tableau, and we look forward to helping you make more of them in the future. The hardworking maps team at Tableau is always looking for ways to help you.
If you have ideas, please post them in our Ideas Forum. We look forward to helping you make the best—and most original—map you can think of!