<commit_before>/* adapted from Mike Bostock's treemap example on d3js.org, d3 example code Library released under BSD license. Copyright 2013 <NAME>.
adapted code Copyright 2013 <NAME> */

function Treemap(jsonPath) {
	var w = 1000 - 80,
	    h = 800 - 180,
	    x = d3.scale.linear().range([0, w]),
	    y = d3.scale.linear().range([0, h]),
	    color = d3.scale.category20c(),
	    root,
	    node;
	var treemap;
	var svg;
	var root;
	var data;
	var nodes;
	var cell;
	var plotVar = this;
	var div;

	this.initTreemap = function () {
		div = d3.select("#visWrapper").append("div")
		.attr("class", "tooltip")
		.style("opacity", 0);

		treemap = d3.layout.treemap()
		    .round(false)
		    .size([w, h])
		    .sticky(true)
		    .value(function(d) { return d.length; });

		svg = d3.select("#plot").append("div")
		    .attr("class", "chart")
		    .style("width", w + "px")
		    .style("height", h + "px")
		  .append("svg:svg")
		    .attr("width", w)
		    .attr("height", h)
		  .append("svg:g")
		    .attr("transform", "translate(.5,.5)");
<commit_msg>Fixing size to window issue with treemap<commit_after>/* adapted from <NAME>'s treemap example on d3js.org, d3 example code Library released under BSD license. Copyright 2013 <NAME>.
adapted code Copyright 2013 <NAME> */

function Treemap(jsonPath) {
	var w,
	    h = 800 - 180,
	    x = d3.scale.linear().range([0, w]),
	    y = d3.scale.linear().range([0, h]),
	    color = d3.scale.category20c(),
	    root,
	    node;
	var treemap;
	var svg;
	var root;
	var data;
	var nodes;
	var cell;
	var plotVar = this;
	var div;

	this.initTreemap = function () {
		w = document.getElementById('plot').offsetWidth*.97

		div = d3.select("#visWrapper").append("div")
		.attr("class", "tooltip")
		.style("opacity", 0);

		treemap = d3.layout.treemap()
		    .round(false)
		    .size([w, h])
		    .sticky(true)
		    .value(function(d) { return d.length; });

		svg = d3.select("#plot").append("div")
		    .attr("class", "chart")
		    .style("width", w + "px")
		    .style("height", h + "px")
		  .append("svg:svg")
		    .attr("width", w)
		    .attr("height", h)
		  .append("svg:g")
		    .attr("transform", "translate(.5,.5)");

{'fraction_non_alphanumeric': 0.1875, 'fraction_numerical': 0.030109489051094892, 'mean_word_length': 2.8882978723404253, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '7111618', 'n_tokens_mistral': 909, 'n_tokens_neox': 786, 'n_words': 197}