<commit_before>d3plus.public = {}

d3plus.public.active = {
  "key": null,
  "mute": {
    "value": []
  },
  "solo": {
    "value": []
  },
  "spotlight": {
    "accepted": [true,false],
    "value": false,
    "deprecates": ["spotlight"]
  }
}

d3plus.public.aggs = {
  "deprecated": ["nesting_aggs"],
  "value": {}
}

d3plus.public.axes = {
  "mirror": {
    "accepted": [true,false],
    "deprecates": ["mirror_axis","mirror_axes"],
    "value": false
  },
  "values": ["x","y"]
}

d3plus.public.attrs = {
  "value": {}
}

d3plus.public.color = {
  "deprecates": ["color_var"],
  "key": null,
  "mute": {
    "value": []
  },
  "solo": {
    "value": []
  }
}

d3plus.public.container = {
  "value": null
}

d3plus.public.coords = {
  "center": [0,0],
  "fit": {
    "accepted": ["auto","height","width"],
    "value": "auto"
  },
  "mute": {
    "value": []
  },
  "padding": 20,
  "projection": {
    "accepted": ["mercator","equirectangular"],
    "value": "mercator"
  },
  "solo": {
    "value": []
  },
  "threshold": 0.1,
  "value": null
}

d3plus.public.data = {
  "large": 400,
  "value": []
}

d3plus.public.depth = {
  "value": 0
}

d3plus.public.descs = {
  "value": {}
}

d3plus.public.dev = {
  "accepted": [true,false],
  "value": false
}

d3plus.public.edges = {
  "arrows": {
    "accepted": [true,false],
    "direction": {
      "accepted": ["source","target"],
      "value": "target"
    },
    "value": false
  },
  "deprecates": ["edges"],
  "label": false,
  "large": 100,
  "limit": false,
  "source": "source",
  "target": "target",
  "value": null
}

d3plus.public.error = {
  "value": false
}

d3plus.public.focus = {
  "deprecates": ["highlight"],
  "tooltip": {
    "accepted": [true,false],
    "value": true
  },
  "value": null
}

d3plus.public.footer = {
  "link": null,
  "value": false
}

d3plus.public.height = {
  "small": 250,
  "value": null
}

d3plus.public.history = {
  "accepted": [true,false],
  "states": [],
  "value": true
}

d3plus.public.html = {
  "deprecates": ["click_function"],
  "value": null
}

d3plus.public.icon = {
  "deprecates": ["icon_var"],
  "key": "icon",
  "style": {
    "deprecates": ["icon_style"],
    "object": true,
    "value": "default"
  }
}

d3plus.public.id = {
  "data_filter": true,
  "deprecates": ["id_var","nesting"],
  "key": "id",
  "mute": {
    "value": [],
    "deprecates": ["filter"]
  },
  "nesting": ["id"],
  "solo": {
    "value": [],
    "deprecates": ["solo"]
  }
}

d3plus.public.labels = {
  "accepted": [true,false],
  "value": true
}

d3plus.public.legend = {
  "accepted": [true,false],
  "label": null,
  "order": {
    "accepted": ["alpha","color"],
    "sort": {
      "accepted": ["asc","desc"],
      "value": "asc"
    },
    "value": "color"
  },
  "value": true
}

d3plus.public.messages = {
  "accepted": [true,false],
  "value": true
}

d3plus.public.nodes = {
  "value": null
}

d3plus.public.number_format = {
  "value": function(number,key,vars) {

    if (vars && vars.time.key && key == vars.time.key) {
      return number
    }
    else if (number < 10 && number > -10) {
      return d3.round(number,2)
    }
    else if (number.toString().split(".")[0].length > 4) {
      var symbol = d3.formatPrefix(number).symbol
      symbol = symbol.replace("G", "B") // d3 uses G for giga

      // Format number to precision level using proper scale
      number = d3.formatPrefix(number).scale(number)
      number = parseFloat(d3.format(".3g")(number))
      return number + symbol;
    }
    else if (key == "share") {
      return d3.format(".2f")(number)
    }<commit_msg>added default "year" catch to number formatter<commit_after>d3plus.public = {}

d3plus.public.active = {
  "key": null,
  "mute": {
    "value": []
  },
  "solo": {
    "value": []
  },
  "spotlight": {
    "accepted": [true,false],
    "value": false,
    "deprecates": ["spotlight"]
  }
}

d3plus.public.aggs = {
  "deprecated": ["nesting_aggs"],
  "value": {}
}

d3plus.public.axes = {
  "mirror": {
    "accepted": [true,false],
    "deprecates": ["mirror_axis","mirror_axes"],
    "value": false
  },
  "values": ["x","y"]
}

d3plus.public.attrs = {
  "value": {}
}

d3plus.public.color = {
  "deprecates": ["color_var"],
  "key": null,
  "mute": {
    "value": []
  },
  "solo": {
    "value": []
  }
}

d3plus.public.container = {
  "value": null
}

d3plus.public.coords = {
  "center": [0,0],
  "fit": {
    "accepted": ["auto","height","width"],
    "value": "auto"
  },
  "mute": {
    "value": []
  },
  "padding": 20,
  "projection": {
    "accepted": ["mercator","equirectangular"],
    "value": "mercator"
  },
  "solo": {
    "value": []
  },
  "threshold": 0.1,
  "value": null
}

d3plus.public.data = {
  "large": 400,
  "value": []
}

d3plus.public.depth = {
  "value": 0
}

d3plus.public.descs = {
  "value": {}
}

d3plus.public.dev = {
  "accepted": [true,false],
  "value": false
}

d3plus.public.edges = {
  "arrows": {
    "accepted": [true,false],
    "direction": {
      "accepted": ["source","target"],
      "value": "target"
    },
    "value": false
  },
  "deprecates": ["edges"],
  "label": false,
  "large": 100,
  "limit": false,
  "source": "source",
  "target": "target",
  "value": null
}

d3plus.public.error = {
  "value": false
}

d3plus.public.focus = {
  "deprecates": ["highlight"],
  "tooltip": {
    "accepted": [true,false],
    "value": true
  },
  "value": null
}

d3plus.public.footer = {
  "link": null,
  "value": false
}

d3plus.public.height = {
  "small": 250,
  "value": null
}

d3plus.public.history = {
  "accepted": [true,false],
  "states": [],
  "value": true
}

d3plus.public.html = {
  "deprecates": ["click_function"],
  "value": null
}

d3plus.public.icon = {
  "deprecates": ["icon_var"],
  "key": "icon",
  "style": {
    "deprecates": ["icon_style"],
    "object": true,
    "value": "default"
  }
}

d3plus.public.id = {
  "data_filter": true,
  "deprecates": ["id_var","nesting"],
  "key": "id",
  "mute": {
    "value": [],
    "deprecates": ["filter"]
  },
  "nesting": ["id"],
  "solo": {
    "value": [],
    "deprecates": ["solo"]
  }
}

d3plus.public.labels = {
  "accepted": [true,false],
  "value": true
}

d3plus.public.legend = {
  "accepted": [true,false],
  "label": null,
  "order": {
    "accepted": ["alpha","color"],
    "sort": {
      "accepted": ["asc","desc"],
      "value": "asc"
    },
    "value": "color"
  },
  "value": true
}

d3plus.public.messages = {
  "accepted": [true,false],
  "value": true
}

d3plus.public.nodes = {
  "value": null
}

d3plus.public.number_format = {
  "value": function(number,key,vars) {

    var time = vars && vars.time.key ? [vars.time.key] : ["year","date"]

    if (time.indexOf(key.toLowerCase()) >= 0) {
      return number
    }
    else if (number < 10 && number > -10) {
      return d3.round(number,2)
    }
    else if (number.toString().split(".")[0].length > 4) {
      var symbol = d3.formatPrefix(number).symbol
      symbol = symbol.replace("G", "B") // d3 uses G for giga

      // Format number to precision level using proper scale
      number = d3.formatPrefix(number).scale(number)
      number = parseFloat(d3.format(".3g")(number))
      return number + symbol;
    }
    else if (key == "share") {
      return d3.format(".2f")(number)
    }
{'fraction_non_alphanumeric': 0.22741005218346608, 'fraction_numerical': 0.015792364734962924, 'mean_word_length': 2.9495661605206074, 'pattern_counts': {'":': 206, '<': 5, '<?xml version=': 0, '>': 8, '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': '4066167', 'n_tokens_mistral': 2947, 'n_tokens_neox': 2893, 'n_words': 514}