<commit_before><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>

</head>
<body>
<div style="width: 520px; height: 500px"></div>
<script src="vanilla.js"></script>
<script>
  (function () {

    var data = [];
    console.time('gen');
    var count = 10000;
    for (var i = 0; i < count; ++i) {
      //data.push({x: 100*i/count, y: 100*(count-i)/count});
      data.push({x: Math.random()*100, y: Math.random()*100});
    }
    console.timeEnd('gen');
    var div = document.querySelector('div');

    var s = new datavisyn.scatterplot.create(data, div);
    var bak = s.render.bind(s);
    s.render = function() {
      console.time('render');
      bak();
      console.timeEnd('render');
    };
    s.render();
  })();
</script>
</body>
</html>
<commit_msg>add notes to test side<commit_after><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Scatterplot Test</title>

</head>
<body>
<h1>
  Scatterplot test
</h1>
<label>Number of Points:
    <input type="number" step="1000" value="10000">
  </label>
<section>
<div style="width: 520px; height: 500px"></div>
</section>
<section>
<pre>
  Notes:
   * drag/zoom as usual
   * tooltip after a while
   * lasso selection using ctrl/alt key
   * single selection should work
   * debug output with rendering information
   * build with Typescript + Webpack2
</pre>
</section>
<script src="vanilla.js"></script>
<script>
  (function () {
    function rebuild(count) {
      var data = [];
      console.time('gen');
      for (var i = 0; i < count; ++i) {
        //data.push({x: 100*i/count, y: 100*(count-i)/count});
        data.push({x: Math.random()*100, y: Math.random()*100});
      }
      console.timeEnd('gen');
      var div = document.querySelector('div');
      div.innerHTML = ''; //clear existing stuff

      var s = new datavisyn.scatterplot.create(data, div);
      //hack render to have information
      var bak = s.render.bind(s);
      s.render = function() {
        console.time('render');
        bak();
        console.timeEnd('render');
      };
      s.render();
    }

    document.querySelector('input').onchange = function() {
      rebuild(+this.value);
    };
    rebuild(10000);
  })();
</script>
</body>
</html>

{'fraction_non_alphanumeric': 0.1921204072598495, 'fraction_numerical': 0.027445772465692783, 'mean_word_length': 2.937282229965157, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 46, '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': '3692495', 'n_tokens_mistral': 835, 'n_tokens_neox': 773, 'n_words': 183}