Today’s task entails connecting to ARCGIS via Tableau. This is actually quite simple. First you need to find something that has an api that can connect to the ARCGIS server. Then you can simply click on connect to data:
In the to a server, one of the default options is the Esri ArcGIS Server. After connecting Tableau should default it to an extract, although this extract seems to either be a proxy or doesn’t actually exist.
A lot of esri data can be found on their hub: https://hub.arcgis.com/
Today, I took the data from the NSW Government Landing Zone Public source. You can find it here: https://data.gov.au/dataset/ds-nsw-fe6352d7-ad01-498d-a1de-029d7f3d764a/distribution/dist-nsw-c4601e55-dcac-4f2e-b07a-3a96eba08671/details?q=land%20zoning
The link on the bottom is the code you can copy and paste into Tableau ArcGIS connector.
Since ARCGIS data is usually quite simple, especially the ones provided from the government, i decided to go with a dashboard that is more design focused. I would either want a 3D Tableau Map with the size based on the building height, or a MapBox custom map. I plan to have a simple bar chart listing the top 10 LGAs with the highest average height and then the user being able to select the LGA with the bar and filter to that level.
Unfortunately, from the upload I found Mapbox only accepts these following file types.
I converted it into a json only to find that you need to use the API to upload files. The API requires tokens to access so it is quite challenging. I did eventually find that making the data into a tile allows you to directly upload. However this make the map with no interactivity, which limits a lot of mapbox’s funcitonality. So, I decided to take up the challenge and make the 3D map in Tableau.
Prepping the Data
To get a simple 3D effect you need to layer your maps on top of each other. The regular map has a bird’s eye view so you can’t get depth from it. I need something like this:
To get this I needed polygons rather than a spatial object. This can be done in Alteryx via the spatial tools.
The hyper file was extracted through a Tableau Workbook, an ARCGIS service doesn’t actually create a hyper extract. The geo-spatial objects were turned to points using the poly-split and then further turned to coordinates via the spatial info tool.
Building the 3D Chart
To build the chart you actually need to stack layers on top of each other. I gradually increased the filter for build height and this then removes some of the polygons. Afterwards stacking the maps slightly off from one another can create a pseudo 3D effect. Warning: this can be time consuming and difficult. I researched to find the height thresholds that would be appropriate for each layer.
As we can see each layer has less polygons left. I also had to fix the axis to make sure the maps stay same size. Then, the other maps were set to transparent background and floated them on the first layer.
Everything stays the same, except for the position of Y, each time a new layer was added, reduce the value of Y by one. Eventually Y should be 0. The result is as follows:
As we can see the 3D effect is quite subtle. If you want a greater ‘pop’ then you can reduce the value of Y by more than one.
At this stage, I suddenly had a new idea: to find LGA data to create a scatterplot between height of build and population, median income, happiness etc. These were added to a show/hide container.
Finding and Insights
From today, I learnt about the ability to create different polygons using tableau, even for a map. This could be useful when trying to find a great design for any spatial analysis. The overall 3D effect is kind of hard to implement and is definitely a cool to have. However, I learnt that you can actually extract geo-data straight from Esri using a Tableau packaged workbook. This saves a lot of time as it’s hard to transform in Alteryx. The 3D would also be much more effective if you could change without fixing the axis as then you can really only have one chart have the 3D effect.
From the scatters, we also find some interesting correlations. Income, population, death rate and crime rate all seem to have an impact on the actual build height. Explore through the dashboard yourself here: