Having come across many articles, I do notice many individuals seek to generate hex maps for their current spatial datasets either for the sake of aesthetics (E.g. Dashboard visualisations) or to minimise spatial distortion from overlapping geometry features. Well, I have got good news for these individuals as I have recently discovered that the combined use of 2 JavaScript libraries – enables users to render the required output instantly, eliminating the hassle of adding any extra calculated fields in Tableau. This new functionality has been deployed onto my web app at https://tableau-data-utility.onrender.com/ for the convenience of users and for future usage. So, here’s a quick preview of the data transformation and resulting visualisations:

The above image does not involve any calculations in Tableau. The approach to this is simply pre-processing your GeoJSON formatted file into another GeoJSON file which renders hexagons instead of polygons.
Simply navigate to https://tableau-data-utility.onrender.com/ and input your spatial data into the web app:



For reference sake, the file for US_States.geojson can be found on my [GitHub](https://gist.github.com/incubated-geek-cc/d6a8571fe6b5ba433f5b431bab630c21/raw/8bb5201e3b091ce125d6233e4dc38dc02fbb59f5/US_States_hexagon_90_500000_hexmap.geojson) and the output file with the above parameters – inverted hexagon + width (500,000m) can be found here on my GitHub as well. Just save the file and render it in Tableau or Leafletjs (whichever GeoJSON platform you prefer) and that’s all you have to do to get your hex map visualisation!
Basically, the browser tool uses the libraries Turf and Hextile which does all the heavy lifting at the backend to churn out the hex-formatted data. One note of caution would be to identify the hexagons which are not mapped to any specific part of the map:


Feel free to try out with other datasets with other countries’ provinces or states by visiting https://tableau-data-utility.onrender.com/— Note that there are currently a few tabs on the web app’s header:

Feel free to make use of the other Tableau data utility tools – Network Graph to CSV from another [tutorial](https://towardsdatascience.com/underrated-combined-functionalities-of-tableau-point-linestring-polygon-mapping-b4c0568a4de2) I have published as well as Spatial Data to CSV in this tutorial.
Hope this has helped to simplify and reduce the hassle involved in data-processing for Tableau!
Thank you for reading.