<commit_before><commit_msg>turns graph into modulr js file<commit_after>// parsing data
var pc_data = JSON.parse(httpGet("api/pc_data.json"));

//This part is just importing the variables from the JSON values
var bremner = pc_data["data"]["points"]["bremner"];
var howard = pc_data["data"]["points"]["howard"];
var jackson = pc_data["data"]["points"]["jackson"];
var martland = pc_data["data"]["points"]["martland"];
var mchugh = pc_data["data"]["points"]["mchugh"];
var mowbray = pc_data["data"]["points"]["mowbray"];
var orr = pc_data["data"]["points"]["orr"];
var scadding = pc_data["data"]["points"]["scadding"];
var seaton = pc_data["data"]["points"]["seaton"];
var wedd = pc_data["data"]["points"]["wedd"];
// Plotly Stuff

//club month info

var xValue = ['Bremner\'s', 'Howard\'s', 'Jackson\'s', 'Martland\'s', 'McHugh\'s', 'Mowbray\'s', 'Orr\'s', 'Scadding\'s', 'Seaton\'s', 'Wedd\'s'];

var yValue = [bremner, howard, jackson, martland, mchugh, mowbray, orr, scadding, seaton, wedd];

var trace1 = {
  x: xValue,
  y: yValue,
  type: 'bar',
  marker:{
    color: ['red', 'orange', "yellow", 'purple', 'brown', 'gray', 'blue', 'teal', 'green', 'black']
  }
};

var data = [trace1];

var annotationContent = [];

var layout = {
  xaxis: {
    title: 'House'
  },
  yaxis: {
    title: 'Total Points',
    showticklabels: 'false'
  },
  font: {
    family: '"Nexa Light","Open Sans", verdana, arial, sans-serif',
    color: 'white'
  },
  paper_bgcolor: 'rgba(0,0,0,0)',
  plot_bgcolor: 'rgba(0,0,0,0)',
  annotations: annotationContent
};

//global info
var tweaks = {
  displayModeBar: false
}

for( var i = 0 ; i < xValue.length ; i++ ){
  var result = {
    x: xValue[i],
    y: yValue[i],
    text: yValue[i],
    xanchor: 'center',
    yanchor: 'bottom',
    showarrow: false
  };
  annotationContent.push(result);
}


Plotly.newPlot('graph', data, layout, tweaks);
{'fraction_non_alphanumeric': 0.21405750798722045, 'fraction_numerical': 0.005857294994675187, 'mean_word_length': 4.693939393939394, 'pattern_counts': {'":': 0, '<': 4, '<?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': '5351381', 'n_tokens_mistral': 715, 'n_tokens_neox': 734, 'n_words': 165}