test/functional/apps/visualize/_tile_map.js
/**
     * manually compare data due to possible small difference in numbers. This is browser dependent.
     */
manually compare data due to possible small difference in numbers. This is browser dependent.
manually compare data due to possible small difference in numbers . This is browser dependent .
function compareTableData(expected, actual) {
      expect(actual.length).to.eql(expected.length);
      function tokenize(row) {
        const tokens = row.split(' ');
        let geohashIndex;
        let countIndex;
        let latIndex;
        let lonIndex;
        if (tokens.length === 8) {
          geohashIndex = 0;
          countIndex = 1;
          latIndex = 4;
          lonIndex = 6;
        } else if (tokens.length === 9) {
          geohashIndex = 1;
          countIndex = 2;
          latIndex = 5;
          lonIndex = 7;
        } else {
          log.error(`Unexpected number of tokens contained in spy table row: ${row}`);
        }
        return {
          geohash: tokens[geohashIndex],
          count: tokens[countIndex],
          lat: Math.floor(parseFloat(tokens[latIndex])),
          lon: Math.floor(parseFloat(tokens[lonIndex]))
        };
      }
      expect(actual.map(tokenize)).to.eql(expected.map(tokenize));
    }
function compareTableData ( expected , actual ) { expect ( actual . length ) . to . eql ( expected . length ) ; function tokenize ( row ) { const tokens = row . split ( ' ' ) ; let geohashIndex ; let countIndex ; let latIndex ; let lonIndex ; if ( tokens . length === 8 ) { geohashIndex = 0 ; countIndex = 1 ; latIndex = 4 ; lonIndex = 6 ; } else if ( tokens . length === 9 ) { geohashIndex = 1 ; countIndex = 2 ; latIndex = 5 ; lonIndex = 7 ; } else { log . error ( ` ${ row } ` ) ; } return { geohash : tokens [ geohashIndex ] , count : tokens [ countIndex ] , lat : Math . floor ( parseFloat ( tokens [ latIndex ] ) ) , lon : Math . floor ( parseFloat ( tokens [ lonIndex ] ) ) } ; } expect ( actual . map ( tokenize ) ) . to . eql ( expected . map ( tokenize ) ) ; }
manually compare data due to possible small difference in numbers.
manually compare data due to possible small difference in numbers .
// table row aggregations: geohash_grid -> count -> geocentroid // table row aggregations: filter -> geohash_grid -> count -> geocentroid