In the .dat format for data, each individual data time-series begins with the variable name associated with it. Following the variable name, the data is listed in two columns. The first column contains the time for the data value; the second column contains the data value itself.
Comments may follow either the data names or the number pairs. You can add spaces freely to make data more legible.
You can arrange variable names arbitrarily, and even repeat them, in which case Vensim will combine the data into a single series.
You can name the .dat format file anything you wish. The normal extension is .dat, although you may override this.
The general format for .dat data entry is as follows:
VARIABLE NAME 1
Time Point 1 | Data Value 1 |
Time Point 2 | Data Value 2 |
... |
Time Point N | Data Value N |
VARIABLE NAME 2[subscript1] <TIME BASE NAME>
Time Point 1 | Data Value 1 Optional Comment |
Time Point 2 | Data Value 2 Optional Comment |
Time Point 3 | Data Value 3 Optional Comment |
. . . |
Time Point N | Data Value N Optional Comment |
VARIABLE NAME 3[subscript3] / Optional Comment
Time Point 1 | Data Value 1 Optional Comment |
Time Point 2 | Data Value 2 Optional Comment |
. . . |
Time Point N | Data Value N Optional Comment |
Note the use of subscripts associated with VARIABLE NAME 2 above. Subscripts have the same format as they do in a model and are available in Vensim Professional and DSS. Vensim does not support the use of a Subscript Range in data series you enter; you should include a separate data series for each Subscript Constant for which there is data. Data need not be available for all members of a Subscript Range.
You can include a comment on the line in which the variable is named as long as the comment is separated from the variable name by a slash /. On the lines containing the data, the comment need not have an explicit separator.
Although not required, you may prefer to separate the data to be used as exogenous inputs from the data to be compared with simulated variables. The exogenous data is required to run the model, while the comparison data is normally used in the validation and testing of the model. Vensim supports the use of two or more files containing data.
The optional Time Base name specified after the variable name identifies the model Time Base to be used to interpret the data. If a data file begins with a Time Base name enclosed in angle brackets < >, Vensim assumes that all data will use that Time Base unless you explicitly override this by specifying a different Time Base for a data series.
You will notice that there is liberal room for comments in this data format. If you want to keep a history of where data comes from and who changes it is possible to do this using comments.
Example
<decimal year>
emigration[USA,USSR] / People leaving USA for USSR
1900 51000
1905 20000 new emigration laws enacted
1910 21000
1915 22000
GNP[USA] <MONTH> / Note that this is on a monthly
1 200E12 time base
61 220E12
population[USA]
1900 2.8e6
1904 3.5e6
"Relational" .dat
The .dat format supports an additional syntax, with data on the same line as the variable name, delimited by a | (pipe) character, like:
<variable[subscripts]> | <time> <value>
This is essentially a relational data table, so it may be preferable to use the relational data list format.
Importing .dat format Data into Vensim
If you open a .dat format file in the Text Editor, there will be a command Dat2VDF appearing in the File menu. Selecting this command will convert the data to a .vdf file and load it into Vensim for use with Analysis tools. You can also load .dat format data in using menu Model>Import Dataset. There are no options involved in loading .dat format data. You will be informed of any errors and told which data series were imported.