Visualizing a CSV as text
Sometimes the most effective way to present the data in a CSV is simply to re-present the data as a table of text, with added graphical elements and interactivity. This is a simple example of the UK-climate data presented as a text table with colour highlighting.
Note that the initForm() function uses several variables to establish common tab offsets which are then applied throughout the code. You will often need to define the offset between rows and columns, and it makes sense to do this in a single variable or set of variables as this makes it easier to refine the presentation of the data in a later stage of coding.
int tab1 = 10; int tab2 = 30; int tab3 = 65;
There are multiple ways to set up presentation rules in Processing; we will look at several more powerful methods in later classes.
The text highlighting is done in the same fashion as in previous examples.