Data augmentation (enrichment) typically involves adding further valuble information. Consider a lookup table with some economic and demographic data which you want to add to your analysis in order to provide a better statistical weighting. Or for stock market data, obtain a list of present credit ratings and key financial data of the corporation you are tracking. The functions below are the most common ones to choose:
Do some enrichment this table:
// Some language specifications can be very long
echo(new line, "Example of long contents: ", [countries:Country name,Switzerland,Languages] );
echo(new line, "Let's cut to max. 25 characters, then remove last incomplete word and add '...' behind", new line);
table process ( countries, while (find([Languages],'(')>=0)
[Languages] = trim( outside exclude ( [Languages], '(', ')' )) );
max[] = 25;
table process selected rows ( countries, [Languages]{}>max[],
[Languages] = left last match( left( [Languages], max[] ), ' ') + " ..." );
echo(new line, "Delete all countries without languages and vice versa...");
table delete selected rows ( countries, ['Alpha-2 code']=='' | [Languages]=='' );
table list( countries, briefly, 8 ); // List first and last 8 rows only
Row #: Code Text _______________________________________________________
1: include ( Support Library );
2: table load ( countries, temp.csv); // Hide!
3:
4: // Some language specifications can be very long
5:
6: echo(new line, "Example of long contents: ", [countries:Country name,Switzerland,Languages] );
^
Inside the started program code:
Attempting to access table with column name [Country name].
Specified table column name or number is invalid.
Code execution will stop. Going to interactive mode
-------------------------------------------------------------------------------
Type 'help' for help, 'docs' or 'toc' for online B4P documentation.
>>