<commit_before>import * as d3 from 'd3';
import _ from 'lodash';

export default class D3ForceLayout {
  constructor({ renderCallback }) {
    const forceSimulation = d3.forceSimulation();
    this.forceSimulation = forceSimulation;

    const forceManyBody = d3.forceManyBody();
    forceManyBody.strength(-60);
    forceManyBody.distanceMin(70);
    forceManyBody.distanceMax(350);
    this.forceManyBody = forceManyBody;

    const forceCenter = d3.forceCenter();
    this.forceCenter = forceCenter;

    const forceLink = d3.forceLink();
    forceLink.id(d => d.id);
    forceLink.strength((link) => {
      switch (link.type) {
        case 'contain':
          return 0.12;
        case 'depend':
          return 0.10;
        default:
          return 0;
      }
    });
    this.forceLink = forceLink;<commit_msg>change force layout<commit_after>import * as d3 from 'd3';
import _ from 'lodash';

export default class D3ForceLayout {
  constructor({ renderCallback }) {
    const forceSimulation = d3.forceSimulation();
    this.forceSimulation = forceSimulation;

    const forceManyBody = d3.forceManyBody();
    forceManyBody.strength(-60);
    forceManyBody.distanceMin(120);
    forceManyBody.distanceMax(350);
    this.forceManyBody = forceManyBody;

    const forceCenter = d3.forceCenter();
    this.forceCenter = forceCenter;

    const forceLink = d3.forceLink();
    forceLink.id(d => d.id);
    forceLink.strength((link) => {
      switch (link.type) {
        case 'contain':
          return 0.12;
        case 'depend':
          return 0.10;
        default:
          return 0;
      }
    });
    this.forceLink = forceLink;
{'fraction_non_alphanumeric': 0.11508176862507571, 'fraction_numerical': 0.02604482132041187, 'mean_word_length': 2.780320366132723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7582612', 'n_tokens_mistral': 528, 'n_tokens_neox': 495, 'n_words': 107}