<commit_before><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CSU Peer Comparisons</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="assets/peercomp.css">
<style type="text/css">
${demo.css}
</style>
<script type="text/javascript">
$(function () {
	var update_chart = function (data) { 
		$('#container').highcharts({
		chart: {
		    type: 'column'
		},
		title: {
		    text: data.title //'Historical 6 Year Graduation Rate'
		},
		subtitle: {
		    text: data.subtitle //'2008 Cohort'
		},
		xAxis: {
		    type: 'category',
		    labels: {
			rotation: -45,
			style: {
			    fontSize: '13px',
			    fontFamily: 'Verdana, sans-serif'
			}
		    }
		},
		yAxis: {
		    title: {
		       text:  data.ylabel //'% Graduated'
		    }
		},
		legend: {
		    enabled: false
		},
		tooltip: {
		    pointFormat: 'Rate:{point.y:.1f}<br/>Comparison Type:6yr Grad Rate<br/>Cohort:2008<br/>Campus:{point.name}<br/>'
		},
		series: [{
		    data: data.series
		,
		   /* dataLabels: {
			enabled: true,
			rotation: -90,
			color: '#FFFFFF',
			align: 'right',
			format: '{point.y:.1f}', // one decimal
			y: 10, // 10 pixels down from the top
			style: {
			    fontSize: '13px',
			    fontFamily: 'Verdana, sans-serif'
			}
		    }*/
		}]
		});
	};
	var campus = 'Bakersfield'; // 'San Luis Obispo'
	var grad_year = '6yr'; // '4yr'
	var type = 'GR'; // 'Gap'
	var cohort = '2008'; // '2000'
	var load_chart_data = function (config, callback) {
		var chart_data_src = 'data/' + config.type + config.grad_year + '/' + config.campus.replace(/ /g,'_') + '_' + config.grad_year + config.type + '.json?v=3';
		if (chart_data_src !== config.current_src) {
			$.ajax({url:chart_data_src,success:function (result) {
				callback(result,config.campus,config.grad_year.slice(0,1),config.cohort);
			},failure:function (error) {console.log(error);}});
		}
	};
	var chart_grade_rate = function (json,campus,grad_year,cohort) {
		var cohort2col = {'2000':1,'2001':2,'2002':3,'2003':4,'2004':5,'2005':6,'2006':7,'2007':8,'2008':9}
		var row,col,key,value,data = {'title':'','ylabel':'','series':[],'tooltip':[]};
		col = cohort2col[cohort];
		data.title = 'Historical ' + grad_year + ' Year Graduation Rate';
		data.subtitle = cohort + ' Cohort'
		data.ylabel = '% Graduated';
		for (var i = 0, ilen = json.rows.length; i < ilen; i++) {
			row = json.rows[i];
			key = row[0].replace('California State University','CSU');
			value = parseFloat(row[col]);
			data.series[i] = {'name':key,'y':value};
			if (key.indexOf(campus) !== -1) {
				data.series[i] = {'name':key,'y':value,'color':'#663355'};
			}<commit_msg>added ajax,json debug<commit_after><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CSU Peer Comparisons</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="assets/peercomp.css">
<style type="text/css">
${demo.css}
</style>
<script type="text/javascript">
$(function () {
	var update_chart = function (data) { 
		$('#container').highcharts({
		chart: {
		    type: 'column'
		},
		title: {
		    text: data.title //'Historical 6 Year Graduation Rate'
		},
		subtitle: {
		    text: data.subtitle //'2008 Cohort'
		},
		xAxis: {
		    type: 'category',
		    labels: {
			rotation: -45,
			style: {
			    fontSize: '13px',
			    fontFamily: 'Verdana, sans-serif'
			}
		    }
		},
		yAxis: {
		    title: {
		       text:  data.ylabel //'% Graduated'
		    }
		},
		legend: {
		    enabled: false
		},
		tooltip: {
		    pointFormat: 'Rate:{point.y:.1f}<br/>Comparison Type:6yr Grad Rate<br/>Cohort:2008<br/>Campus:{point.name}<br/>'
		},
		series: [{
		    data: data.series
		,
		   /* dataLabels: {
			enabled: true,
			rotation: -90,
			color: '#FFFFFF',
			align: 'right',
			format: '{point.y:.1f}', // one decimal
			y: 10, // 10 pixels down from the top
			style: {
			    fontSize: '13px',
			    fontFamily: 'Verdana, sans-serif'
			}
		    }*/
		}]
		});
	};
	var campus = 'Bakersfield'; // '<NAME>'
	var grad_year = '6yr'; // '4yr'
	var type = 'GR'; // 'Gap'
	var cohort = '2008'; // '2000'
	var load_chart_data = function (config, callback) {
		var chart_data_src = 'data/' + config.type + config.grad_year + '/' + config.campus.replace(/ /g,'_') + '_' + config.grad_year + config.type + '.json?v=3';
		if (chart_data_src !== config.current_src) {
			$.ajax({url:chart_data_src,success:function (result) {
				console.log(result);
				callback(result,config.campus,config.grad_year.slice(0,1),config.cohort);
			},failure:function (error) {console.log(error);}});
		}
	};
	var chart_grade_rate = function (json,campus,grad_year,cohort) {
		var cohort2col = {'2000':1,'2001':2,'2002':3,'2003':4,'2004':5,'2005':6,'2006':7,'2007':8,'2008':9}
		var row,col,key,value,data = {'title':'','ylabel':'','series':[],'tooltip':[]};
		col = cohort2col[cohort];
		data.title = 'Historical ' + grad_year + ' Year Graduation Rate';
		data.subtitle = cohort + ' Cohort'
		data.ylabel = '% Graduated';
		console.log(json);
		for (var i = 0, ilen = json.rows.length; i < ilen; i++) {
			row = json.rows[i];
			key = row[0].replace('California State University','CSU');
			value = parseFloat(row[col]);
			data.series[i] = {'name':key,'y':value};
			if (key.indexOf(campus) !== -1) {
				data.series[i] = {'name':key,'y':value,'color':'#663355'};
			}
{'fraction_non_alphanumeric': 0.2067299087166637, 'fraction_numerical': 0.03472346518704134, 'mean_word_length': 3.452589641434263, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 36, 'https://': 2, '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': '4589927', 'n_tokens_mistral': 2452, 'n_tokens_neox': 2055, 'n_words': 384}