Tab-Delimited Data Files

Corda® Server™ can load tab-delimited files, which are very common and can be exported by most database and spreadsheet applications. Tab-delimited files only support data, and not formatting options or data annotations.

This section is divided into the following topics:

Formatting Data

Tab delimited data files are files in which each cell of data is delimited by a tab character, and each row of cells is delimited by a line break. Upon import, Corda Server translates these files directly into a spreadsheet.

When preparing tab-delimited data files, organize the data in tables consistent with the spreadsheet format used by Corda Builder's Data Editor. For more information about organizing data, see Graph Data and About Maps in the Corda Builder™ User Guide.

For non-standard graph types (X-Y and Time Plots), see Data Organization in the Corda 7 Graph Guide.

Graphs

The example below displays tab-delimited graph data:

Example Data in Tab-Delimited Format (Graphs)

City

Arrivals

Departures

Unused

Out of Commission

Atlanta

23

36

11

7

Boston

41

17

25

9

 

If a graph uses data categories, the file can also be organized as shown in the example below, where each row of data represents a single data value. For more information, see Alternative Data Organization Format in the Corda 7 Graph Guide.

Example Data in Alternative Tab-Delimited Format (Graphs)

Atlanta

Arrivals

23

 

Atlanta

Departures

36

Atlanta

Unused

11

 

Atlanta

Out of Commission

7

Boston

Arrivals

41

 

Boston

Departures

17

Boston

Unused

25

 

Boston

Out of Commission

9

 

Maps

The example below demonstrates tab-delimited map data.

Example Data in Tab-Delimited Format (Maps)

City

Arrivals

Adelaide

23

Brisbane

78

Canberra

1

Darwin

55

Hobart

25

Melbourne

71

Perth

9

Sydney

52

 

Note: The first row contains optional header information that is not used by Corda Server except in support of meta tags (or macros). For more information, see META Tags.

Each row represents a separate map data item. The first column identifies the map shape to which the data value belongs, while the second column specifies the actual value.

If it's necessary to identify map items by names other than the one specified in the name attribute of the map shape, use its long-name or code attribute instead. For example, a database might store information for a TX object under Texas, or a database might use FIPS codes instead of county or state names.

Any map data items referenced in the data file must already be defined in the Image Template file, or Corda Server ignores all data associated with that reference.

For information about adding map shapes to a map, see Adding Point Layer Data Items and Adding Area Data Items in the Corda Builder User Guide.

Importing with Corda Embedder

To import tab-delimited data files into graphs, use the loadData() method. To import tab-delimited data files into maps, use the loadMapData() method. Both function in the same manner, as described below.

Important: In order for Corda Server to load any kind of file or data source, it must be given permission to read data from the specified path or domain. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

Graphs

The loadData() method accepts two parameters for tab-delimited data:

Important: ASP/VBScript requires five parameters. The last three parameters are empty strings (““).

For example, to load a data file named <document_root>\data\prices.dat, use the following Corda Embedder method call:

myImage.loadData("graph","data/prices.dat");

Similarly, to load data from a Web application at http://Webapp.mycompany.com/getdata, use the following Corda Embedder method call:

myImage.loadData("graph","http://Webapp.mycompany.com/getdata?year=2002");

Note: The code above assumes a Corda Embedder object named myImage.

Maps

The loadMapData() method accepts three parameters for tab-delimited data:

Important: ASP/VBScript requires five parameters. The last two parameters are empty strings (““).

For example, to load a data file named <document_root>\data\prices.dat, use the following Corda Embedder method call:

myImage.loadMapData("map","Area","data/prices.dat");

Similarly, to load data from a Web application at http://webapp.mycompany.com/getdata, use the following Corda Embedder method call:

myImage.loadMapData("US","Points","http://webapp.mycompany.com/getdata?year=2002");

Note: The code above assumes a Corda Embedder object named myImage.