<commit_before>
var width = window.screen.availWidth,
    height = window.screen.availHeight,
    root;

var force = d3.layout.force()
    .size([width, height])
    .on("tick", tick);

var svg = d3.select("div#example").append("svg")
    .attr("id", "graph")
    .attr("viewBox", "0 0 " + width + " " + height )
    .attr("preserveAspectRatio", "xMidYMid meet");
    // .attr("width", width)
    // .attr("height", height)

var link = svg.selectAll(".link"),
    node = svg.selectAll(".node").append("g"); 

    // I want to make the node object a group.
    // This will have a circle and icon

// function updateWindow(){
//     width = w.innerWidth || e.clientWidth || g.clientWidth;
//     height = w.innerHeight|| e.clientHeight|| g.clientHeight;
//
//     svg.attr("width", width).attr("height", height);
// }
// window.onresize = updateWindow;

d3.json("/flare.json", function(json) {
  root = json;
  update();
});

function update() {
  var nodes = flatten(root),<commit_msg>update svg window size of window resize<commit_after>
var width = window.screen.availWidth,
    height = window.screen.availHeight,
    root;

var force = d3.layout.force()
    .size([width, height])
    .on("tick", tick);

var svg = d3.select("div#example").append("svg")
    .attr("id", "graph")
    .attr("viewBox", "0 0 " + width + " " + height )
    .attr("preserveAspectRatio", "xMidYMid meet");
    // .attr("width", width)
    // .attr("height", height)

var link = svg.selectAll(".link"),
    node = svg.selectAll(".node").append("g"); 

    // I want to make the node object a group.
    // This will have a circle and icon

function updateWindow(){
    width = window.screen.availWidth;
    height = window.screen.availHeight;

    svg.attr("width", width).attr("height", height);
}
window.onresize = updateWindow;

d3.json("/flare.json", function(json) {
  root = json;
  update();
});

function update() {
  var nodes = flatten(root),
{'fraction_non_alphanumeric': 0.18530020703933747, 'fraction_numerical': 0.005175983436853002, 'mean_word_length': 3.2113289760348582, 'pattern_counts': {'":': 0, '<': 3, '<?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': '840008', 'n_tokens_mistral': 658, 'n_tokens_neox': 639, 'n_words': 155}