<commit_before>// ========== Adding Table code ============

var fieldHeight = 30;
var fieldWidth = 140;

var previousSort = null;
var format = d3.time.format("%m/%d/%Y");
//var dateFn = function(date) { return format.parse(d.created_at) };


var subjectGroups = false;
var sub_data = []

d3.json("/data/subjects.json", function (data) {
    data.forEach(function (d) {
        d.subjectID = "s" + d.subjectID.toString();
        sub_data.push(d);
    });
    refreshTable(null);
});

var table_svg = d3.select("#table").append("svg")
    .attr("width", 700)
    .attr("height", 400);

var ramp = null;

var headerGrp = table_svg.append("g").attr("class", "headerGrp");
var rowsGrp = table_svg.append("g").attr("class","rowsGrp");


var tableGuiConfigObj = function () {
    this.groupCount = 2;
};

var tableGui = new dat.GUI({
    autoplace: false,
    width: 350,
    scrollable: false
});

var tableControlBox = new tableGuiConfigObj();

// gui.domElement.id = 'gui';
var tableGuiContainer = $('.tableGUI').append($(tableGui.domElement));

var groupCountController = tableGui.add(tableControlBox, 'groupCount')
    .name('Number of Groups');

groupCountController.onChange(function () {
    refreshTable(sortOn);
});
tableGui.close()

var sortOn = null
refreshTable(sortOn)

function refreshTable(sortOn){<commit_msg>Update sortable-table.js<commit_after>// ========== Adding Table code ============

var fieldHeight = 30;
var fieldWidth = 140;

var previousSort = null;
var format = d3.time.format("%m/%d/%Y");
//var dateFn = function(date) { return format.parse(d.created_at) };


var subjectGroups = false;
var sub_data = []

d3.json("/data/subjects.json", function (data) {
    data.forEach(function (d) {
        d.subjectID = "s" + d.subjectID.toString();
        sub_data.push(d);
    });
    refreshTable(null);
});

var table_svg = d3.select("#table").append("svg")
    .attr("width", 700)
    .attr("height", 400);

var ramp = null;

var headerGrp = table_svg.append("g").attr("class", "headerGrp");
var rowsGrp = table_svg.append("g").attr("class","rowsGrp");


var tableGuiConfigObj = function () {
    this.groupCount = 2;
};

var tableGui = new dat.GUI({
    autoplace: false,
    width: 350,
    scrollable: false
});

var tableControlBox = new tableGuiConfigObj();

// gui.domElement.id = 'gui';
var tableGuiContainer = $('.tableGUI').append($(tableGui.domElement));

var groupCountController = tableGui.add(tableControlBox, 'groupCount').min(1).step(1)
    .name('Number of Groups');

groupCountController.onChange(function () {
    refreshTable(sortOn);
});
tableGui.close()

var sortOn = null
refreshTable(sortOn)

function refreshTable(sortOn){
{'fraction_non_alphanumeric': 0.18290854572713644, 'fraction_numerical': 0.01424287856071964, 'mean_word_length': 4.338, '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': '6058880', 'n_tokens_mistral': 927, 'n_tokens_neox': 882, 'n_words': 186}