<commit_before>import { Vector3 } from 'three/math/Vector3';
import loadJson from './loadJson';

const multiplier = 300;

export default function loadBigData(callback) {
  loadJson('assets/newbigData_v8.json', (error, data) => {
    if (!error) {
      const bigData = data.map(extract);
      callback(undefined, bigData);
    }
    else {
      callback(error, undefined);
    }
  });
}

function extract({ id, title, info, tsneVektor, cluster, cluster_name }) {
  const [x, y, z] = tsneVektor;
  return {
    id,
    title,
    info,
    position: new Vector3(x * multiplier, y * multiplier, z * multiplier),
    cluster,
    'clusterName': cluster_name,
  };
}<commit_msg>Changed quoted key in extract function to keyword<commit_after>import { Vector3 } from 'three/math/Vector3';
import loadJson from './loadJson';

const multiplier = 300;

export default function loadBigData(callback) {
  loadJson('assets/newbigData_v8.json', (error, data) => {
    if (!error) {
      const bigData = data.map(extract);
      callback(undefined, bigData);
    }
    else {
      callback(error, undefined);
    }
  });
}

function extract({ id, title, info, tsneVektor, cluster, cluster_name }) {
  const [x, y, z] = tsneVektor;
  return {
    id,
    title,
    info,
    position: new Vector3(x * multiplier, y * multiplier, z * multiplier),
    cluster,
    clusterName: cluster_name,
  };
}
{'fraction_non_alphanumeric': 0.13275613275613277, 'fraction_numerical': 0.010101010101010102, 'mean_word_length': 3.361635220125786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4977875', 'n_tokens_mistral': 461, 'n_tokens_neox': 445, 'n_words': 119}