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