metreex-analysis.js
/**
 * Creates a 2-dimensional array, with each row containing the projection data associated with a particular title
 * @param {Array} data Full set of metric data
 * @param {Array} titles Set of titles
 * @param {Array} projectionData Array containing the full set of projection data generated by PCA
 * @returns {Array} titledata PCA projection data sorted into bins by title
 */
Creates a 2-dimensional array, with each row containing the projection data associated with a particular title
@param {Array} data Full set of metric data
@param {Array} titles Set of titles
@param {Array} projectionData Array containing the full set of projection data generated by PCA
@returns {Array} titledata PCA projection data sorted into bins by title
Creates a 2 - dimensional array with each row containing the projection data associated with a particular title @param { Array } data Full set of metric data @param { Array } titles Set of titles @param { Array } projectionData Array containing the full set of projection data generated by PCA @returns { Array } titledata PCA projection data sorted into bins by title
function binProjectionDataByTitle(data, titles, projectionData){
    var titledata = build2DArray(titles.length),
        index,
        titleIndex,
        titleToCompare;
    for (index = 0; index < data.length; index++){
        titleToCompare = (data[index].title).toString().toLowerCase();
        for (titleIndex = 0; titleIndex < titles.length; titleIndex++){
            if (titleToCompare === (titles[titleIndex]).toLowerCase()) break;
        }
        titledata[titleIndex].push(projectionData[index]);
    }
    return titledata;
}
function binProjectionDataByTitle ( data , titles , projectionData ) { var titledata = build2DArray ( titles . length ) , index , titleIndex , titleToCompare ; for ( index = 0 ; index < data . length ; index ++ ) { titleToCompare = ( data [ index ] . title ) . toString ( ) . toLowerCase ( ) ; for ( titleIndex = 0 ; titleIndex < titles . length ; titleIndex ++ ) { if ( titleToCompare === ( titles [ titleIndex ] ) . toLowerCase ( ) ) break ; } titledata [ titleIndex ] . push ( projectionData [ index ] ) ; } return titledata ; }
Creates a 2-dimensional array, with each row containing the projection data associated with a particular title
 @param {Array} data Full set of metric data
 @param {Array} titles Set of titles
 @param {Array} projectionData Array containing the full set of projection data generated by PCA
 @returns {Array} titledata PCA projection data sorted into bins by title
Creates a 2 - dimensional array with each row containing the projection data associated with a particular title @param { Array } data Full set of metric data @param { Array } titles Set of titles @param { Array } projectionData Array containing the full set of projection data generated by PCA @returns { Array } titledata PCA projection data sorted into bins by title