Week 6

This week, I worked on patching up the mistakes I made last week. This involved creating a new class in JavaScript in which each transformation operator is represented with a static function. The static functions in the class differ from one another in terms of its parameter. For example, some take an integer as an argument, while some other take a string as an argument. To be more specific, the JavaScript class has the following seven static classes: filter, aggregate, project, collect, bin, extent, and stack. Then in each static class, I wrote its unique operation function. It is important to note that an operation is distinct from an operator: an operation (e.g., sort in descending order) is like the unique way an operator (e.g., collect) can be utilized. In this example, I can pass the boolean “true” to the parameter “descending” of the operation function to get a Vega-formatted query command. However, it is important to note that I cannot necessarily pass “true” to every operation function because not every operation function has the same parameter. Therefore, by referring to Vega documentation, I individually created the operator functions as appropriately.

Written on July 6, 2021