<commit_before>var profilerGrid = {


	init: function(args) {

		//INIT GLOBALS
		this.initGlobals();

		this.$detail.hide();
		this.$prevbtn.hide();

		this.loadData(1, args.googleKey);
	},

	initGlobals: function() {

		//GLOBALS
		this.current = 0;
		this.totalEntries = [];
		this.allData = [];
		this.ds = [];

		//JQUERY CACHING
		this.$detail = $("#detail");
		this.$prevbtn = $("#prevbtn");
		this.$nextbtn = $("#nextbtn");

	},

	loadData: function(which, key) {
		var that = this;

		//LOAD DATA WITH MISO
		//SAMPLE SPREADSHEET
		//https://docs.google.com/spreadsheet/pub?key=0AurS2EUbrPERdE9Nc1dMSGdfenFCN0FCTk9jZF9TVWc&output=html
		that.ds = new Miso.Dataset({
	  		importer : Miso.Dataset.Importers.GoogleSpreadsheet,
	  		parser : Miso.Dataset.Parsers.GoogleSpreadsheet,
	  		key : key,
	  		worksheet : which
		});

		that.ds.fetch({
		  success : function() {
		    that.populateGrid();
		  },
		  error : function() {
		  	console.error("ERROR: Failed to load Google Spreadsheet");
		  }
		});

	},

	showDetail: function(which) {

		this.current = which;

		this.$detail.show();
		this.$detail.animate({ opacity: '1' }, 500);

		var context = {
			name: this.allData[which][0].name,
			photo: this.allData[which][0].photourl,
			blurb: this.allData[which][0].blurb,
			url: this.allData[which][0].url,
			data1: this.allData[which][0].data1,
			data2: this.allData[which][0].data2,
			data3: this.allData[which][0].data3
		}

		this.$detail.html(Handlebars.templates['display-template'](context));

		this.checkNav();

		//CLOSE BUTTON
		$("#closebtn").click(function() {
			this.$detail.hide();
			this.$detail.animate({ opacity: '0' }, 500);
			$("#detail #vid").empty();
		});

	},

	nextPerson: function() {
		this.current ++;
		this.showDetail(this.current);<commit_msg>close button reference to this has been fixed<commit_after>var profilerGrid = {


	init: function(args) {

		//INIT GLOBALS
		this.initGlobals();

		this.$detail.hide();
		this.$prevbtn.hide();

		this.loadData(1, args.googleKey);
	},

	initGlobals: function() {

		//GLOBALS
		this.current = 0;
		this.totalEntries = [];
		this.allData = [];
		this.ds = [];

		//JQUERY CACHING
		this.$detail = $("#detail");
		this.$prevbtn = $("#prevbtn");
		this.$nextbtn = $("#nextbtn");

	},

	loadData: function(which, key) {
		var that = this;

		//LOAD DATA WITH MISO
		//SAMPLE SPREADSHEET
		//https://docs.google.com/spreadsheet/pub?key=0AurS2EUbrPERdE9Nc1dMSGdfenFCN0FCTk9jZF9TVWc&output=html
		that.ds = new Miso.Dataset({
	  		importer : Miso.Dataset.Importers.GoogleSpreadsheet,
	  		parser : Miso.Dataset.Parsers.GoogleSpreadsheet,
	  		key : key,
	  		worksheet : which
		});

		that.ds.fetch({
		  success : function() {
		    that.populateGrid();
		  },
		  error : function() {
		  	console.error("ERROR: Failed to load Google Spreadsheet");
		  }
		});

	},

	showDetail: function(which) {
		var that = this;
		this.current = which;

		this.$detail.show();
		this.$detail.animate({ opacity: '1' }, 500);

		var context = {
			name: this.allData[which][0].name,
			photo: this.allData[which][0].photourl,
			blurb: this.allData[which][0].blurb,
			url: this.allData[which][0].url,
			data1: this.allData[which][0].data1,
			data2: this.allData[which][0].data2,
			data3: this.allData[which][0].data3
		}

		this.$detail.html(Handlebars.templates['display-template'](context));

		this.checkNav();

		//CLOSE BUTTON
		$("#closebtn").click(function() {
			that.$detail.hide();
			that.$detail.animate({ opacity: '0' }, 500);
			$("#detail #vid").empty();
		});

	},

	nextPerson: function() {
		this.current ++;
		this.showDetail(this.current);
{'fraction_non_alphanumeric': 0.18186813186813186, 'fraction_numerical': 0.016483516483516484, 'mean_word_length': 3.4565483476132193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6561243', 'n_tokens_mistral': 1541, 'n_tokens_neox': 1338, 'n_words': 217}