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

Combining the data

During the import process, we will combine the data in the Countries and Regions file with the Child mortality and population growth file into a single data table.

The process is pretty much identical for the Analyst and web clients:

  1. Click the + icon on the left-hand side of the application and click Browse local file...:
  1. Navigate to where you downloaded the data files.
  2. Select the Child-mortality-and-population-growth and Countries and Regions data files and open them.
  3. Accept the default column types for both files (Analyst clients only).
  1. Expand the import panel for the Countries and Regions file (by clicking Countries and Regions.csv) and select Add as columns to:

You will notice a red warning—that is because there isn't an obvious match between the column names in the two columns:

  1. To fix this, click the cog wheel icon to open the match columns dialog.
  2. Click the Add match button.
  3. Select the Code (String) and alpha-3 (String) columns in each data table, respectively. Notice how Spotfire gives a helpful preview of the values in each of the columns to give a hint as to which columns you should choose to match on:
  1. Click the Add button.
  2. Now, look at the resulting preview—you can see how the columns have been matched and the resultant structure of the data that will be brought into Spotfire:
  1. Click OK to accept the settings and then OK again to load the data.
Notice that we used the default join settings—this is for a left-outer join. Spotfire explains the join types nicely if we were to open the join settings and explore them further. In most cases, however, a left-outer join is what's required it's absolutely ideal for adding columns to one data table from another data file.

So far in this example, we have learned how to load two data files and combine, or join, them into a single data table. The original population growth versus child mortality data did not contain any information about regions, so we have added columns from the countries and regions data to augment it. We can now go ahead and build a visualization that shows the combined data.

主站蜘蛛池模板: 右玉县| 商洛市| 涡阳县| 曲麻莱县| 胶州市| 海宁市| 琼海市| 治多县| 金山区| 南和县| 德保县| 都江堰市| 乐山市| 噶尔县| 睢宁县| 黄陵县| 鄂州市| 尚义县| 遂川县| 红安县| 仲巴县| 阳新县| 米脂县| 开化县| 广德县| 榆林市| 陇西县| 来安县| 肃宁县| 法库县| 枞阳县| 新龙县| 平塘县| 池州市| 盘锦市| 理塘县| 丰城市| 中阳县| 阿克陶县| 阿瓦提县| 贵阳市|