<commit_before>
function jsonRequestFailure(jqXHR, status, errorThrown){
    console.log(errorThrown);
}

function requestDataTable(target, dataSource){
    $.ajax({
        url: dataSource,
        type: 'GET',
        dataType: 'json',
        success: function(incoming) { insertDataTable(target, incoming); },
        error: jsonRequestFailure,
    });
}

function insertDataTable(target, data){
    console.log(target);
    console.log(data);
    data = data['data'];
    var columns = [];
    var rows = [];

    for(var key in data[0]){
        columns.push(key);
    }

    for(var i = 0; i < data.length; i++){
        var row = [];
        rows.push(row);
        for(var keyId in columns){
            row.push(data[i][columns[keyId]]);
        }
    }

    console.log(columns);
    console.log(rows);

	$(target)
		.TidyTable({
			columnTitles : columns,
			columnValues : rows,
		});
}<commit_msg>Remove debug output from insertDataTable<commit_after>
function jsonRequestFailure(jqXHR, status, errorThrown){
    console.log(errorThrown);
}

function requestDataTable(target, dataSource){
    $.ajax({
        url: dataSource,
        type: 'GET',
        dataType: 'json',
        success: function(incoming) { insertDataTable(target, incoming); },
        error: jsonRequestFailure,
    });
}

function insertDataTable(target, data){
    console.log(target);
    console.log(data);
    data = data['data'];
    var columns = [];
    var rows = [];

    for(var key in data[0]){
        columns.push(key);
    }

    for(var i = 0; i < data.length; i++){
        var row = [];
        rows.push(row);
        for(var keyId in columns){
            row.push(data[i][columns[keyId]]);
        }
    }

	$(target)
		.TidyTable({
			columnTitles : columns,
			columnValues : rows,
		});
}
{'fraction_non_alphanumeric': 0.1489716509171762, 'fraction_numerical': 0.0022234574763757642, 'mean_word_length': 2.5714285714285716, 'pattern_counts': {'":': 0, '<': 5, '<?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': '788113', 'n_tokens_mistral': 592, 'n_tokens_neox': 567, 'n_words': 122}