Give a chestnut! Tableau Tips (48): Connect shapefile space files for map analysis

published: 2021-05-23

2017 Shenzhen Tableau SummitOn the other hand, when the map of Guangdong Province appeared on the big screen, the participants raised their cameras and took pictures. Many people ask us: The map I opened is not like this. How can such a map be made?

Indeed, many Tableau users use Mapau for their data analysis. If you use Tableau's own map source, the background map will display the content of other countries, or the Tableau display can only reach the geographic level of the city. No deeper exploration is possible.

How do you make the map highlight the desired geographic area and display more levels for further data exploration?

In fact, this is not difficult, only need to use space files can be easily achieved.

In this issue of "Give a Chestnut", the Tableau technique that Ada wants to share with you is: connect the shapefile space file for map analysis.

We will take the distribution of population in various administrative regions of Wuhan as an example.

Specific steps are as follows:

Step 1:Prepare spatial data files and population data files

Download China County Administrative Division Shapefile Space File。

Download demographic data for each administrative region of Wuhan。

Step 2:Connect to shapefile and Excel file

Connect to shapefiles and Excel files in Tableau and connect them by region name so that you can only take geographic information from various administrative areas in Wuhan.

Step 3:presenting the administrative area map of Wuhan

Drag the automatically generated latitude and longitude in the metric to the row and column ribbon, and the Tableau default map service will be called automatically.

Go to the [Map-Map Layer] interface and remove all the selected layers, so that only the latitude and longitude coordinates of the Tableau default map are used;

Double-click the Geometry metric in the metric, or drag the metric to the detail in the marker. The region map for Wuhan appears in the view, setting the white background to a softer light green.

Step 4:set the color to fill the map according to the population

Set the Population in the measure to a dimension and drag it into the color type in the marker and set the corresponding color; you can display other geographic features such as the region name and population size on the map as needed.

In this way, the use of spatial files can achieve better visual analysis and greater flexibility.

Today's Tableau tips, are you getting it? Open your Tableau and try it out!