官术网_书友最值得收藏!

Spatial join (2018.2)

A new type of Join, called an Intersect, is now available, and it was created especially for spatial files. You can find it in the Join configuration, highlighted as follows:

Intersects are useful when the only common field between the two tables is the spatial one. Tableau joins the data when there is a spatial intersection between a polygon and a point. 

For example, let's look at how to join the two following shapefiles. The first one contains the polygons of the French regions:

The second one contains a list of ports around the world:

To recreate the example, you can download the ZIP file  Spatial Join  from the  Chapter 1  section of my website,  book.ladataviz.com  (or, browse to https://ladataviz.com/wp-content/uploads/2018/09/Spatial-Join.zip ).

Let's create a spatial Join between the two spatial files, as follows:

  1. Open Tableau and connect to the first spatial file, contours-geographiques-des-nouvelles-regions-metropole.shp.
  2. Add a second spatial connection in the same Data Source (see Chapter 12, Advanced Data Connections, if you don't know how to create cross-database Joins), and choose the ne_10m_ports.shp file.
  3. Choose an Inner interest Join between the two tables, shown as follows:

  1. You can test your Data Source; the remaining French regions are the ones with ports, and the remaining ports are only French ones. If you create a Dual Axis map, you can show both the regions and the ports on the same map, as follows:

This is surely a great advancement for using spatial files in Tableau. Let's finish this section by looking at other Data Source improvements.

主站蜘蛛池模板: 洛宁县| 怀来县| 隆化县| 乐都县| 岳池县| 阿拉善右旗| 隆林| 东至县| 广水市| 诸暨市| 台南县| 原平市| 鱼台县| 浦北县| 曲阳县| 万盛区| 纳雍县| 稻城县| 沛县| 永康市| 平定县| 和平县| 呼和浩特市| 涿鹿县| 西乌珠穆沁旗| 读书| 中方县| 河源市| 岳西县| 宜章县| 潜江市| 会理县| 通榆县| 天津市| 临澧县| 阿拉善右旗| 廊坊市| 瓮安县| 刚察县| 丹巴县| 日土县|