Having finished 1 of my spatial analytics projects, I was all ready to present my findings in Tableau but faced the unconventional problem of having absolutely no Internet access. As most of us usually take the in-built geocoding and basemap services in Tableau for granted, this had brought on more complications than I had initially expected.

Basically when Internet accessibility is not available, the above map rendered becomes like this instead –

So ouch… Clearly, this has some devastating impacts. What was even more devastating was the appalling lack of in-depth tutorials for rendering spatial data without its in-built map functionalities. So I proceeded to do some exploration on my own and mainly, there were 2 issues I had to resolve to get my project done:
- Ensuring the map polygons of Singapore are rendered proportionately and to scale.
- Display the missing basemap details – highways, street names etc. since they are no longer automatically shown in the background.
Addressing Issue 1 – Plotting map polygons and render its actual proportions
Based on the above context, all I had to work with was a spatial data file in GeoJSON format (for this tutorial’s sake I have uploaded a sample onto my GitHub at sg_planning_areas_2020_elderly_distribution.geojson) and proceeded to study it.
Fundamentally, a GeoJSON FeatureCollection object is a JSON object which contains all the necessary coordinates (latitudes and longitudes) to render its geometric shapes onto any map. As such, I decided to leverage on this information to churn out the geometric shapes using "Polygon" instead of "Map". This would require a data format easily interpreted by Tableau – in which case the format I settled on was a CSV file:

Fortunately, there is a tool I have created right here at https://tableau-data-utility.onrender.com/ to speed up the process.

Basically, it’s a browser-based application tool I had created with all instructions and required information for implementation. All I needed to do now was upload the above GeoJSON file, export the transformed output by selecting "Generate CSV Output" and render it in Tableau with "Polygon":

Then magic happens! Issue 1 has been resolved— The map polygons are now rendered in its correct proportions without the need for geocoding services.

However, with issue 1 resolved, the second issue quickly took its place—which is the lack of a basemap , **** leading us directly to issue 2.
Addressing Issue 2 – Plotting the Basemap layer of Spatial Data rendered in Tableau
At first glance, while this may not seem like a big deal at first, it soon became problematic when I was tasked to investigate and optimise various transportation routes around the island:

Clearly, while the outline of a country/state/province can be easily inferred from its map polygons, transportation routes represented by (Multi)Point and (Multi)LineString are not so apparent without a detailed map layer as its basemap as seen above. The sample data used to render the above can be found at my GitHub: sg_tiong_bahru_mkt_to_vivo_city.geojson. Using the same tool, the GeoJSON file has now been converted into CSV format (sg_tiong_bahru_mkt_to_vivo_city.csv).

Hence, this then brings us to a simple yet extremely useful and convenient functionality available on the application – the ability to export out the background map image for Tableau:

There are a few particular sub-functionalities to note here:
1. Choice of basemap can be changed – By default, the basemap from OpenStreetMap (OSM) is used. However, users are able to change the basemap by entering a valid basemap URL as shown below:

2. Automated display and updates of the map bounds – Right below the map, there is a table of coordinates which are auto-updated when the map is zoomed or moved.

Hence, to export the appropriate map image for the transportation route – it is essential to ensure that both zoom level and bounds of the map captured in the map’s viewing port includes the desired boundaries of your geometry shapes. This eventually leads us to:


As such, issue 2 (missing basemap details) is now resolved.
Finally, although I could end the article at this point, but I would also like to share 1 other revelation I gained from this— Plotting mixed geometry types via a combination of standard functionalities in Tableau ("Polygon" and "Line").
Bonus Discovery – Plotting Mixed Geometry Types in Tableau from a single CSV file
Despite the claimed limitations of Tableau being unable to
My exploration of the already existing functionalities of Tableau says otherwise. Tableau does already have the innate functionalities to render mixed geometry types which I shall prove using this spatial file which is created via merging the 2 previous GeoJSON files (actual file is in my GitHub) . The same steps are repeated – GeoJSON is transformed to CSV output and basemap image is exported via the tool at https://tableau-data-utility.onrender.com/, which gives us:

A note of caution would be to take a closer look at the "Marks" panel because each mandatory field has been specifically suffixed with either "(points+lines)" or "(polygons)". This is meant to differentiate which fields should be rendered by "Line" – i.e. (points+lines) and which fields should be rendered by "Polygon" – i.e. (polygon) (and yes, the tool I deployed does generate the fields based on geometry type).
In a nut shell, my attempt at rendering spatial datasets in Tableau via alternative means have shown me further visualisation possibilities using the existing multiple functionalities present. Hope you guys found this useful and feel free to use the tool at https://tableau-data-utility.onrender.com/ to generate your required datasets!
P.S. The previous Tableau tutorial I have published on rendering datasets for network graphs uses the tool deployed on the same site at https://tableau-data-utility.onrender.com/. Do check it out if you wish to plot network graphs with minimal effort in Tableau. Thanks for reading!