If you would like to perform mathematical calculations or transformations directly in OpenRefine, these functions are available. A list of functions with their GREL recipes can be found at the official OpenRefine GitHub page's Math Functions list. A few of these functions and their formulas are outlined below.
Math Functions
- From the Weight column drop down arrow in the sample dataset, choose Edit cells, then Transform, then To number (recall that we did not parse numeric cells into number format in the project setup, so that change must be manually made now).
- With the values in the Weight column now in number format, math functions can be applied. To begin, from the Weight column drop down arrow choose Edit cells, then Transform.
- In the Expression box, type round(value). This rounds the value to the nearest integer.
- Similar math functions include:
- log(value)
- pow(value,x) - where the value is raised to the x-th power.