<commit_before>// function to load JSON file synchonously before d3 rendering

function loadJsonFileSynch(file){
    var ajaxresponse
    $.ajax({
        url: "data/"+file+".json",
        async: false,
        dataType: "json",
        success: function (response) {
            ajaxresponse= response;
        }
    });
    return ajaxresponse;       
}


function generateCountryPieChart(id,datain){

    var data = [
        {"country":"Guinea","cases":datain["Guinea"][0].cases},
        {"country":"Liberia","cases":datain["Liberia"][0].cases},
        {"country":"Sierra Leone","cases":datain["Sierra Leone"][0].cases}
    ];
    
    data.forEach(function(d) {
      d.cases = +d.cases;
    });    

    var margin = {top: 0, right: 0, bottom: 0, left: 0},
        width = $(id).width() - margin.left - margin.right,
        height = $(id).height() - margin.top - margin.bottom,
        radius = Math.min(width, height) / 2;<commit_msg>Made Guinea last in the draw order<commit_after>// function to load JSON file synchonously before d3 rendering

function loadJsonFileSynch(file){
    var ajaxresponse
    $.ajax({
        url: "data/"+file+".json",
        async: false,
        dataType: "json",
        success: function (response) {
            ajaxresponse= response;
        }
    });
    return ajaxresponse;       
}


function generateCountryPieChart(id,datain){

    var data = [
        {"country":"Liberia","cases":datain["Liberia"][0].cases},
        {"country":"Sierra Leone","cases":datain["Sierra Leone"][0].cases},
        {"country":"Guinea","cases":datain["Guinea"][0].cases}
    ];
    
    data.forEach(function(d) {
      d.cases = +d.cases;
    });    

    var margin = {top: 0, right: 0, bottom: 0, left: 0},
        width = $(id).width() - margin.left - margin.right,
        height = $(id).height() - margin.top - margin.bottom,
        radius = Math.min(width, height) / 2;
{'fraction_non_alphanumeric': 0.1664050235478807, 'fraction_numerical': 0.009419152276295133, 'mean_word_length': 2.547309833024119, 'pattern_counts': {'":': 12, '<': 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': '163525', 'n_tokens_mistral': 621, 'n_tokens_neox': 589, 'n_words': 129}