Page 1 of 1

Importing time series data from a textfile

Posted: Fri May 31, 2019 8:46 pm
by Quame
Dear All,

I have a number of time series data in a text file that I want to use to drive my model model. My plan had been to import the data and create a vdf file
from which I would use the 'GET VDF DATA' function to get the data. I am forced to import from a text file because Excel cannot be installed on the server I am working on. I am getting errors using the 'GET VDF DATA' function because I have not been successful in introducing a variable name in the text file that can be reference as an argument in the function. Kindly assist. Attached is an example of the file in excel.

Re: Importing time series data from a textfile

Posted: Fri May 31, 2019 10:01 pm
by tomfid
GET VDF DATA is for retrieving a value from a Vensim dataset, not a text file. I think you want to use either the GET DIRECT DATA function, or import the dataset from text to VDF. GET VDF DATA is rarely needed.

Re: Importing time series data from a textfile

Posted: Fri May 31, 2019 11:00 pm
by Quame
Okay thanks for the reply. I tried that, but the issue I had was with respect to the arguments. The function has the arguments "GET DIRECT DATA( {'filename'} , {'tabname'} , {'time_row_or_col'} , {'first_data_cell'} )". In the text file, how do I reference ,tabname, time row or col, and first data cell? This is easy to do in excel or csv but not text file

Re: Importing time series data from a textfile

Posted: Sat Jun 01, 2019 12:39 am
by tomfid
Check the sample models in the help system. For ext files, the tab name field is used for the delimiter.
http://vensim.com/documentation/fn_get_direct_data.htm

Re: Importing time series data from a textfile

Posted: Sat Jun 01, 2019 12:40 am
by tomfid
You reference the rows and columns with the same notation as if it were an Excel file.

Re: Importing time series data from a textfile

Posted: Sat Jun 01, 2019 4:56 pm
by Quame
Okay thanks