<commit_before>d3.chart('Base').extend('Icicle', {

  initialize: function (options) {
    this.options = options = options || {};

    var self = this;

    this.layer('tree', this.base, {
      // select the elements we wish to bind to and bind the data to them.
      dataBind: function (data) {
        var chart = this.chart();

        if (chart.onDataBind) {
          data = chart.onDataBind(data, chart);
        }

        return this.selectAll("g.node").data(data, function(d){
          return d.id;
        });
      },

      // insert actual element, defined its own attrs
      insert:   function () {
        var chart = this.chart();
        var node = this.insert("g").attr("class", "node");

        if (chart.onInsert) {
          chart.onInsert(chart, node, this);
        }

        // add any property to each "node", and return itself
        return node;
      },

      // define lifecycle events
      events:   {
        'enter': function () {
          var chart = this.chart();

          // onEnter fn will take two args
          // chart  # refer to this context, used it to access xScale, yScale, width, height, etc.
          // chart property this   # refer to each individual group just appended by insert command
          if (chart.onEnter) {
            chart.onEnter(chart, this);
          }<commit_msg>clean up the data layer of icic;e<commit_after>d3.chart('Base').extend('Icicle', {

  initialize: function (options) {
    this.options = options = options || {};

    var self = this;

    this.layer('icicle', this.base, {
      // select the elements we wish to bind to and bind the data to them.
      dataBind: function (data) {
        var chart = this.chart();

        if (chart.onDataBind) {
          data = chart.onDataBind(data, chart);
        }

        return this.selectAll("g.icicle-node").data(data);
      },

      // insert actual element, defined its own attrs
      insert:   function () {
        var chart = this.chart();
        var node = this.insert("g").attr("class", "icicle-node");

        if (chart.onInsert) {
          chart.onInsert(chart, node, this);
        }

        // add any property to each "node", and return itself
        return node;
      },

      // define lifecycle events
      events:   {
        'enter': function () {
          var chart = this.chart();

          // onEnter fn will take two args
          // chart  # refer to this context, used it to access xScale, yScale, width, height, etc.
          // chart property this   # refer to each individual group just appended by insert command
          if (chart.onEnter) {
            chart.onEnter(chart, this);
          }
{'fraction_non_alphanumeric': 0.12010443864229765, 'fraction_numerical': 0.0007459903021260724, 'mean_word_length': 1.9025974025974026, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1833285', 'n_tokens_mistral': 751, 'n_tokens_neox': 729, 'n_words': 243}