<< Click to Display Table of Contents >> Data Sources |
|
A data source is a Microsoft® Excel spreadsheet or workbook containing data associated with particular times. Typically this means time-series data (e.g., 24 values of quarterly sales figures over a 6 year period), but it can also mean a single data point (the population in September, 2012). Data files can be stored anywhere, but a convenient location is in the Data subfolder of the model folder.
A single worksheet or tab will generally contain information for many entities, but all the entities on a single worksheet or tab must be of the same type. The name of the sheet must be the name of the entity type. If you have more than one sheet for an entity type (say, Platypus), the sheets should be named Platypus, Platypus_A, Platypus_B, Platypus_C, etc. The text after the underscore does not have to be A, B, C; it can be whatever you like. The requirement is that each sheet name begins with the entity type name followed by an underscore and the further text to make the name unique.
The worksheet may be organized in any one of four common layouts. Ventity automatically detects which one is being used, based on key words appearing in the first row or column, as follows. The examples shown are for variables Weight and Age of entity type Platypus having key attribute PlatypusID.
Layout |
Description |
Requirements |
Example |
Tidy |
Each row specifies an entity and time; each column, a variable |
First row contains keyword "DateTime" as well as names of variables and key attributes |
|
Relational |
Each row specifies a variable, entity and time. |
First row contains keywords "DateTime", "Varname" and "Value", as well as names of key attributes |
|
Tabular (Across) |
Each row specifies an entity and variable; each column, a time. |
First row contains keyword "Varname" as well as names of key attributes and time values. |
|
Tabular (Down) |
Each row specifies a time; each column, an entity and variable. |
First column contains keyword "Varname" as well as names of key attributes and time values. |
In all layouts, time values may be numerical (e.g 114, or 11.4) or calendar (e.g. 3/12/2015 or any other date format). External data and the model must be using the same time mode (relative or calendar).