Upload data to the Data Library through Ingrid scripts
The IRI Data Library is built on Ingrid, a PostScript-based language, that facilitates the creation of user-tailored analyses and graphics.
In this post describes the basic steps of adding data set to the data library through the ingrid script.
Can use any kind of text editor,
in Windows - eg: Notepad, WordPad, ...
in Linux - eg: Emacs, vi editor, ...
As an example:
Steps to add Tea production and Area to the Data Library.
Step 1.
\begin{ingrid}
Scripts should write inside this codes.
\end{ingrid}
Step 2.
\begin{ingrid}
/tea insertdataset:
The data set and all the other commands are inside this codes.
:insertdataset
\end{ingrid}
Inserting grid
grid:
/name /T def
/long_name /Time def
monthtime
1
Jul 1867 ensotime
12 1
Jul 2016 ensotime
:grid
This is an example of create a Time grid.
Words with backslash sign(/) describes words that added by users(new words), should end with def.
monthtime, ensotime are some key words that describe the format of the date.
This grid describe Years from 1867 to 2016.
Add a Variable and relative Data
variable:
/name /area def
/units /Extent ha def
/missing_value -9999 def
grids: T :grids
values: :values
:variable
This shows how to define variable called area.
Units of the area is Extent Hectares.
Missing values(values that not entered) display by -9999.
This area values appears with the Year. Added the grid called T.
values:
Inside this codes enter the area data from 1867 to 2016
:values
As mentioned above we can add more than one variable in a one script.
Example:
After edit the text, need to save the files as .tex extension.
Commonly files added as index.tex.
Step 3. Finally add the files to the Data Library.
Now the above insert data displays as---> Link
Comments
Post a Comment