Tableau has introduced spatial data support starting from version 2021.2. With the inclusion of various spatial functions, Tableau becomes a powerful tool for spatial analysis, enabling users to quickly set up and explore geographic information. In this blog, we will leverage spatial tools in Tableau to find a lunch spot near your office within a specified distance. We will obtain the necessary data from Yelp’s API, which includes business details such as address, coordinates, categories, reviews, and review counts.

Step 1: Displaying Business and Data School Points

To begin, we need to create a calculated field using the “MAKE POINT” function, utilizing the latitude and longitude data, to represent the business and data school points on the map.

      

Step 2: Creating a Ranging Parameter and Buffer

Next, we will create a ranging parameter to facilitate interactive distance selection. By setting the data school as the target point and the ranging parameter as a dynamic distance, we can create a buffer. This buffer will be displayed on the map’s mark layer as a circle around the data school, indicating the specified distance.

Step 3: Identifying Businesses within the Buffer

To identify businesses located within the buffer, we will create another calculated field using the “INTERSECT” function. This field will mark businesses that intersect with the buffer area, helping us identify potential lunch spots near the office.

Step 4: Enhancing Interactivity with Filters and Actions

To further refine your search, you can apply additional filters based on categories, reviews, or any other relevant criteria. Additionally, you can implement actions to enable more interactive exploration, such as selecting a business to display additional details or navigating to external websites for reviews or menu information.

To sum up, by leveraging Tableau’s spatial tools and integrating data from Yelp’s API, you can easily find a suitable lunch spot near your office. The combination of spatial analysis, interactive filters, and actions empowers you to explore and refine your search based on your preferences. Utilizing Tableau’s spatial capabilities opens up a world of possibilities for location-based analyses and decision-making.

The Data School
Author: The Data School