Data Visualization 101: Geospatial Analysis and Map Visualization in Tableau
- With Increased use of data, location-based decision making has become an intrinsic part of the Business processes
- Understand what is Geospatial Analysis and how you can perform it in Tableau.
Like many of you, I am a big user of app-based services like taxi services Uber /Ola or food delivery app Swigy or Zomato. Earlier I used to amaze, how these location-based services work so well. Like, How they decide and optimize their routes to deliver the products or manage the transportation services.
Later I got to know, all these things are possible, thanks to the ability to map Locations and Geospatial analysis. Such analysis gives an upper hand to the business organization in providing better customer services in a cost-effective manner.
In this article let’s try to understand the Geospatial analysis and prepare a map-based Tableau visualization.
Note: If you are more interested in learning concepts in an Audio-Visual format, We have this entire article explained in the video below. If not, you may continue reading.
I am using Tableau Public, which you can download for free. The data we’ll be using is the US sample superstore dataset widely used in the Tableau community. available for you inside Tableau itself.
What is Geospatial Analysis
Most companies manage and store their data in the form of spreadsheets having rows and columns. It is quite difficult for them to generate insights from that.
For instance, if a company wants to know in which region of a state most of its customers are located or say in which state demand for the product is highest. There could be endless scenarios related to location-based decision-making.
Here we have our favorite US- Super Store data-set. In this, we have location-based columns like Country/Region, City, State, and Postal Codes along with other measures like Sales, Quantity, Discount, Profit. Now the question is how can we combine these pieces of information to generate insights such as what geographical Location is contributing most in
Here comes Geospatial Analysis in the picture. Thanks to Geospatial Analysis, we can collect, gather, store and analyze generate insights from the same information. It is a powerful concept that has poured a lot of business ideas around the globe. Maps make it easier to recognize patterns that were previously hidden in the spreadsheets.
Have a look at the image below. This is a classic example of a map visualization in the Tableau, how beautifully it shows the Sales numbers by States in The United States. After looking at this map, in an instant, the sales team of your company can recognize which state is doing well and which isn’t and can use it to prepare their strategy. Isn’t it amazing!
We will create the same visualization later in this article.
Use Cases of Geospatial Analysis
Before jumping into the practical part, let’s first understand some of the popular business use cases of Geospatial analysis.
Sales and Marketing
Geospatial analysis can be used to understand the customer segments for better targeting by sales and marketing teams. Information-based targeting will lead to an increased customer base.
Transportation and Logistics
Similarly, location-based planning of transportation and Logistics can result in cost cutting and efficient utilization of resources of the organization. In short, it helps significantly in supply chain management.
Next comes situational intelligence, through map-based visualization, businesses understand situations better and in turn plan accordingly. For instance, why there is an increase or decrease in the customer response in a particular region, is it due to some festival or holiday season.
Risk analysis is another area like the insurance companies can get insights on the regions where they are overexposed.
Strategic growth and optimization
The Geospatial analysis helps the organizations in understanding the areas where they can expand their operations. The expansion depends on multiple factors like time, efforts and money hence needs to be more insightful.
It is the most popular Geospatial analysis use case. Each time you log in to Google Maps to know about the location or how much time you will take to reach your destination, say thanks to Geospatial analysis.
This was just a glimpse into the applications of Geospatial analysis, to make you understand its effectiveness. Now without further delay, let’s directly jump into the practical and create our first map-based visualization in tableau.
Create Your Visualization
For this visualization, we are going to use the US- superstore dataset. Once you are connected with the data open the workbook and try to understand, what are location-based dimensions we can use in our visualizations. As we can see, here we have Country, City, State, Postal Codes in dimension pane any of them can be utilized. I am using State to understand the distribution of Sales.
Now in the first step press ctrl+ select State and Sales. Once the data is selected click on the Show me button available on the upper right corner and select the recommended map. As shown in the following image.
Here, we get nothing but a regular world map so we need to take a few more steps. The issue here is that there are multiple locations around the world with the same name, so we need to tell Tableau exactly what are locations we want.
You will notice on the bottom right corner of the map the 49 unknown messages. Just click on that and a popup window will appear. On the pop-up window click on the Edit Location now you will see another window. Here, select the Country/Region and select the From field. Now we have the United States automatically appeared, click OK.
Instantly you will get your first map visualization in tableau. But still, it’s far from what we want as it is not showing any information.
Click on the drop-down available below the Marks card and select Map. Here we have our map of the United States. Still, I can see a problem. I hope you too see that our sales measure is representing the size but on a map, the size of the state does not change so it doesn’t make any sense.
To resolve this issue, remove the Sales from the size and put in the colors card. Now we have our final viz giving the distribution of Sales in different States. According to the map, the states California, Texas, and New York show the highest sales. Look at the map below.
Now you can play around with the visualization like you can change the measures and the colors of the map. In the following map, I have shown the distribution of Profit across the states.
Looking at this map we can say Texas is the least profitable state. Now we need to explore the options and strategies to increase the profit there. I will leave this task for you let me know in the comment section if you have any idea to do that.
To summarize, in this article we learn about Geospatial analysis and its important use cases in today’s tech-savvy world. Further, we have generated our first map-based visualizations in Tableau.
In case you are interested to learn more about visualization and Tableau, I will recommend you to go through our course Tableau for Beginners.
Don’t hesitate to comment below in case you have any grievances