src/processors/data-processor.js
function cleanUpFalsyCsvValue(rows) {
  for (let i = 0; i < rows.length; i++) {
    for (let j = 0; j < rows[i].length; j++) {
      // analyzer will set any fields to 'string' if there are empty values
      // which will be parsed as '' by d3.csv
      // here we parse empty data as null
      // TODO: create warning when deltect `CSV_NULLS` in the data
      if (!rows[i][j] || CSV_NULLS.includes(rows[i][j])) {
        rows[i][j] = null;
      }
    }
  }
}
function cleanUpFalsyCsvValue(rows) {
  for (let i = 0; i < rows.length; i++) {
    for (let j = 0; j < rows[i].length; j++) {
      // analyzer will set any fields to 'string' if there are empty values
      // which will be parsed as '' by d3.csv
      // here we parse empty data as null
      // TODO: create warning when deltect `CSV_NULLS` in the data
      if (!rows[i][j] || CSV_NULLS.includes(rows[i][j])) {
        rows[i][j] = null;
      }
    }
  }
}
function cleanUpFalsyCsvValue ( rows ) { for ( let i = 0 ; i < rows . length ; i ++ ) { for ( let j = 0 ; j < rows [ i ] . length ; j ++ ) { // analyzer will set any fields to 'string' if there are empty values // which will be parsed as '' by d3.csv // here we parse empty data as null // TODO: create warning when deltect `CSV_NULLS` in the data if ( ! rows [ i ] [ j ] || CSV_NULLS . includes ( rows [ i ] [ j ] ) ) { rows [ i ] [ j ] = null ; } } } }
Convert falsy value in csv including `'', 'null', 'NULL', 'Null', 'NaN'` to `null`,
so that type-analyzer won't detect it as string

@param {Array<Array>} rows
Convert falsy value in csv including null NULL Null NaN to null so that type - analyzer won t detect it as string