<commit_before>
$(document).ready(function() {
    $('#form').on('submit', function(event) {
        fetchData($('#user').val());
        event.preventDefault();
    });
});


function fetchData(user) {
    $.ajax({
        url: '/api/user/' + user,
        dataType: 'json'
    })
    .done( function( data ) {
        var commitsPerRepo = Model.getCommitsPerRepo(data);
        drawCommitsByRepoChart(commitsPerRepo);
        
        var commitsPerWeek = Model.getCommitsPerWeek(data);
        drawCommitsPerWeekChart(commitsPerWeek);
        
        drawRecentCommitsChart(commitsPerWeek);
    })
    .error( function(err) {
        console.log(err);
    });<commit_msg>chart for commits over past 12 weeks<commit_after>
$(document).ready(function() {
    $('#form').on('submit', function(event) {
        fetchData($('#user').val());
        event.preventDefault();
    });
});


function fetchData(user) {
    $.ajax({
        url: '/api/user/' + user,
        dataType: 'json'
    })
    .done( function( data ) {
        var commitsPerRepo = Model.getCommitsPerRepo(data);
        drawCommitsByRepoChart(commitsPerRepo);
        
        var commitsPerWeek = Model.getCommitsPerWeek(data);
        drawCommitsPerWeekChart(commitsPerWeek);

        var recentCommits = Model.getCommitsOverPastWeeks(commitsPerWeek, new Date(), 12 );
        
        drawRecentCommitsChart(recentCommits);
    })
    .error( function(err) {
        console.log(err);
    });
{'fraction_non_alphanumeric': 0.14948805460750852, 'fraction_numerical': 0.0027303754266211604, 'mean_word_length': 2.674185463659148, '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': '609675', 'n_tokens_mistral': 453, 'n_tokens_neox': 448, 'n_words': 70}