Week 6 – How I Learned to Stop Worrying and Love the DOM

With my column header selection function working from last week, I started implementing some of the functions that will use it. The data environment keeps track at all times now which columns are selected in an array. Some of the functions are toggle functions, for turning on or off certain types of enhancements on the CSV file – these functions can be called on a group of selected columns as well as on one at a time. These two functions keep their own arrays of which columns have been toggled “on” for their respective enhancements. Updating these arrays relies on the selected column array, so the functions know which columns to add or remove.

The data environment also needs to be able to accept any annotations the user may wish to add to the data set for conversion. For example, some of my labmates are working with some data where the column headers for measurements in the table include the units in the header; one table header says, “NH4+ (mg/L)”. A human user can figure out that this means every number in that column is a measurement with the units “milligrams per liter”, but it would take some careful parsing for the computer to know that. The easy alternative is to allow the human performing the CSV to RDF conversion to provide this information explicitly. Annotations could also be important for providing additional metadata describing how a particular procedure, or give a definition for something that might be internal to the institution who created the CSV data table.

The CSV to RDF data environment now creates an empty row just for these types of annotations when the table is generated, between the column header names and the remainder of the data table. This row is hidden when the table is first generated, but it appears when the user uses the context menu to add a comment. Right now, I have this capability working in a very basic sense, and in the next week or so, I hope to provide a good interface window for the user to enter their comment, and maybe even select what type of annotation they want to make from a standard set of annotation properties.

There is another empty row that the table makes when it is first generated, too – this is for holding columns that have been bundled. Bundling will be my next big task; it is a very important functionality for the data environment, but I think also one of the more complex ones for the user interface. In terms of data structures, I will have to keep track of how many bundles exist, as well as which columns are in each. Then I will have to update the bundled column row of the table in the browser window environment accordingly, so that the user can see what they are working on. I feel like I have been working up to it with the other javascripting I have done thus far, though! I look forward to tackling this function next week.

Leave a Reply

Your email address will not be published. Required fields are marked *

*