<commit_before>// CHART (Score, Salary, Employment Gender)
/* global d3, crossfilter */
(function(viz) {
	'use strict';

	// function that colors elements according to faculty selected
	var colorElements = function(d) {
		var faculty = viz.strip(d.faculty);
		var input = d3.select('input[name="'+faculty+'"]');
		var checked = input.property('checked');

		if (checked) {
			return viz.COLORS[faculty];
		}
		else {
			return 'gainsboro';
		}
	};

	// function that reduces opacity of elements according to uas input
	var fadeElements = function(d) {
		var score = d.uas;
		if (score > viz.uasData) {
			return 0.2;
		}
		else {
			return 1.0;
		}
	};

	var SALARY_TT_HTML = 
		'<div><span class="value-header">75<sup>th</sup> </span><span id="first-value" class="secondary-value"></span></div><div><span class="value-header">25<sup>th</sup> </span><span id="second-value" class="secondary-value"></span></div>';

	// format function
	var format = d3.format(',.0f');


	// FIRST INITIALIZES ELEMENTS/DETAILS INDEPENDENT OF DATA
	// DEFINING THE SCALES (domain)

	var yScale = d3.scale.ordinal();
	var xScale = d3.scale.linear();

	// DEFINING THE AXES
	var xAxis = d3.svg.axis()
					.orient('top')
					.ticks(5);
	var yAxis = d3.svg.axis()
					.orient('left')
					.tickSize(0)
					.tickPadding(6);

	// DEFINING THE GRID
	var xGrid = d3.svg.axis()
					.orient('top')
					.ticks(5)
					.tickFormat('');

	// SVG ELEMENTS
	var svg = d3.select('#chart').append('svg');
	var chartWrapper = svg.append('g'); // chart wrapper
	chartWrapper.append('g').classed('grid', true);

	chartWrapper.append('g').classed('x_axis', true);
	chartWrapper.append('g').classed('y_axis', true);
	var tooltip = d3.select('#tooltip')
					.style('opacity', 0);

	// BAR GROUPS
	var firstGroup = chartWrapper.insert('g', '.x_axis');
	var secondGroup = chartWrapper.insert('g', '.x_axis');
						

	// DEFINING LABELS
	var label = svg.append('text').attr('class', 'chart-title')
					.attr('x', 150)
					.attr('y', 45);



	// UPDATE SVG
	svg
		.attr('width', viz.w+viz.margin.left+viz.margin.right)
		.attr('height', viz.h+viz.margin.top+viz.margin.bottom);
	chartWrapper
		.attr('transform', 'translate('+viz.margin.left+','+viz.margin.top+')');


	// UPDATE DIMENSIONS FUNCTION
	// updates width of chart according to current window width
	var updateDimensions = function() {
		var winWidth = window.innerWidth;
		if (winWidth > 960) {
			winWidth = 960;<commit_msg>made changes<commit_after>// CHART (Score, Salary, Employment Gender)
/* global d3, crossfilter */
(function(viz) {
	'use strict';

	// function that colors elements according to faculty selected
	var colorElements = function(d) {
		var faculty = viz.strip(d.faculty);
		var input = d3.select('input[name="'+faculty+'"]');
		var checked = input.property('checked');

		if (checked) {
			return viz.COLORS[faculty];
		}
		else {
			return 'gainsboro';
		}
	};

	// function that reduces opacity of elements according to uas input
	var fadeElements = function(d) {
		var score = d.uas;
		if (score > viz.uasData) {
			return 0.2;
		}
		else {
			return 1.0;
		}
	};

	var SALARY_TT_HTML = 
		'<div><span class="value-header">75<sup>th</sup> </span><span id="first-value" class="secondary-value"></span></div><div><span class="value-header">25<sup>th</sup> </span><span id="second-value" class="secondary-value"></span></div>';

	// format function
	var format = d3.format(',.0f');


	// FIRST INITIALIZES ELEMENTS/DETAILS INDEPENDENT OF DATA
	// DEFINING THE SCALES (domain)

	var yScale = d3.scale.ordinal();
	var xScale = d3.scale.linear();

	// DEFINING THE AXES
	var xAxis = d3.svg.axis()
					.orient('top')
					.ticks(5);
	var yAxis = d3.svg.axis()
					.orient('left')
					.tickSize(0)
					.tickPadding(6);

	// DEFINING THE GRID
	var xGrid = d3.svg.axis()
					.orient('top')
					.ticks(5)
					.tickFormat('');

	// SVG ELEMENTS
	var svg = d3.select('#chart').append('svg');
	var chartWrapper = svg.append('g'); // chart wrapper
	chartWrapper.append('g').classed('grid', true);

	chartWrapper.append('g').classed('x_axis', true);
	chartWrapper.append('g').classed('y_axis', true);
	var tooltip = d3.select('#tooltip')
					.style('opacity', 0);

	// BAR GROUPS
	var firstGroup = chartWrapper.insert('g', '.x_axis');
	var secondGroup = chartWrapper.insert('g', '.x_axis');
						

	// DEFINING LABELS
	var label = svg.append('text').attr('class', 'chart-title')
					.attr('x', 150)
					.attr('y', 45);



	// UPDATE SVG
	svg
		.attr('width', viz.w+viz.margin.left+viz.margin.right)
		.attr('height', viz.h+viz.margin.top+viz.margin.bottom);
	chartWrapper
		.attr('transform', 'translate('+viz.margin.left+','+viz.margin.top+')');


	// UPDATE DIMENSIONS FUNCTION
	// updates width of chart according to current window width
	var updateDimensions = function() {
		var winWidth = window.innerWidth;
		if (winWidth > 960) {
			winWidth = 960;
		}
		if (winWidth < 550) {
			winWidth = 550;
{'fraction_non_alphanumeric': 0.1808080808080808, 'fraction_numerical': 0.015353535353535354, 'mean_word_length': 3.5927643784786643, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 39, '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': '604049', 'n_tokens_mistral': 2042, 'n_tokens_neox': 1766, 'n_words': 389}