Data wrangling, which involves restructuring, enriching, and transforming data into a more valuable format, is important for various purposes, including analytics. CanvasXpress applies a data wrangling process across data sets, integrates information from various data sources to solve problems, and achieve analytical goals.
The CanvasXpress library has a unique set of functionalities that support data-wrangling without the need to contact a server. This result-oriented function empowers our end users to effectively access their data without any hassle. These functions can be called programmatically or used directly through one of the UIs.
Consider the following dataset to showcase some of these methods.
Name | Weight | Height | Waist | Hip | Age | Gender | Excercise | Keith | 65.6 | 174 | 71.5 | 93.5 | 21 | Male | Low |
---|---|---|---|---|---|---|---|
Nina | 51.6 | 161 | 66.5 | 92.0 | 22 | Female | Moderate |
Freddy | 80.7 | 194 | 83.2 | 95.0 | 28 | Male | Moderate |
Tracey | 49.2 | 160 | 61.2 | 91.0 | 19 | Female | Moderate |
Isabelle | 55.2 | 173 | 66.5 | 90.3 | 32 | Female | Low |
Penny | 48.7 | 151 | 61.6 | 90.0 | 35 | Female | Intense |
Grouping can be done through the CanvasXpress configuration
new CanvasXpress( targetId, data, { graphType: "Boxplot", ... groupingFactors: ["Gender"], });
or a function call after the visualization has been rendered
var cX = new CanvasXpress(targetId, data, config); cX.groupSamples(["Gender"]);
Facets can be done through the CanvasXpress configuration
new CanvasXpress( targetId, data, { graphType: "Bar", ... segregateSamplesBy: ["Excercise"], });
or a function call after the visualization has been rendered
var cX = new CanvasXpress(targetId, data, config); cX.segregateSamples(["Excercise"]);
Sorting can be done through the CanvasXpress configuration
// Sort data by Age new CanvasXpress( targetId, data, { graphType: "Bar", sortData: [['var', 'smp', 'Age']] }); //Sort data by Height new CanvasXpress( targetId, data, { graphType: "Bar", sortData: [['cat', 'smp', 'Height']] });
or a function call after the visualization has been rendered
var cX = new CanvasXpress(targetId, data, config); // Sort by Age cX.modifySort(['var', 'smp', 'Age']); // Sort by Height cX.modifySort(['cat', 'smp', 'Height']);
Data can be correlated to its meta-data
Correlation can be done through a function call
var cX = new CanvasXpress(targetId, data, config); cX.correlateData(true, "Hip");
Histograms can be created through the CanvasXpress configuration
new CanvasXpress( targetId, data, { graphType: "Bar", showHistogram: true });
or a function call after the visualization has been rendered
var cX = new CanvasXpress(targetId, data, config); cX.createHistogram();
Cluster data can be done through the CanvasXpress configuration
new CanvasXpress( targetId, data, { graphType: "Bar", samplesClustered: true });
or a function call after the visualization has been rendered
var cX = new CanvasXpress(targetId, data, config); cX.clusterSamples();
Data transformation can be done through a funciton call
var cX = new CanvasXpress(targetId, data, config); cX.transform("log2");
Transposing data can be done through the CanvasXpress configuration
new CanvasXpress( targetId, data, { graphType: "Bar", transposeData: true });
or a function call after the visualization has been rendered
var cX = new CanvasXpress(targetId, data, config); cX.transpose();
Pivot data can be done through a funciton call
var cX = new CanvasXpress(targetId, data, config); cX.pivotX("Gender");