code: function uniqueValues(categorical) {
    const countMap = {};
    categorical.forEach((val) => {
      if (!(val in countMap)) {
        countMap[val] = 0;
      }
      countMap[val] += 1;
    });
    const uniques = [];
    const counts = [];
    Object.keys(countMap).forEach((uniqueVal) => {
      uniques.push(uniqueVal);
      counts.push(countMap[uniqueVal]);
    });
    return [uniques, counts];
  }
docs: /*
  Given a categorical array, return two new arrays, the first containing the
  unique values, the second containing the counts.