<commit_before>$(function () {
    dataset = $('#device-map').data('chart')
    var width = $('#device-map').width();
    var height = $('#device-map').height();
    var scale = 1.0

    var svg = d3.select("#device-map").append("svg").attr({
        width: $('#device-map').width(),
        height: $('#device-map').height(),
    });

    var xScale = d3.scale.linear()
        .domain([0, width])
        .range([0, width * scale]);

    var yScale = d3.scale.linear()
        .domain([0, height])
        .range([0, height * scale]);

    var tooltip = d3.select("body").select("#tooltip")
    var color = d3.scale.category10();
    var a = svg.selectAll("circle").data(dataset).enter().append("a");
    a.attr("xlink:href", function (d) {
        return d["url"];
    })
    .on("mouseover", function (d) {
        return tooltip.style("visibility", "visible").text(d);
    })
    .on("mousemove", function (d) {
        return tooltip.style("top", (event.pageY - 20) + "px").style("left", (event.pageX + 10) + "px");
    })
    .on("mouseout", function (d) {
        return tooltip.style("visibility", "hidden");
    });

    var circle = a.append("circle");
    circle.attr("cx", function (d, i) {
        return xScale(d["x"]);
    }).attr("cy", function (d, i) {
        return yScale(d["y"]);
    }).attr("r", function (d) {
        return 10;
    }).attr("fill", function (d, i) {
        return color(i);
    });

    var text = svg.selectAll("text").data(dataset).enter().append("text");
    text.attr("x", function (d, i) {
        return xScale(d["x"] + 20);
    }).attr("y", function (d, i) {
        return yScale(d["y"] + 5);
    }).text(function (d, i) {
        return d["name"];
    }).attr("fill", function (d, i) {
        return color(i);
    });
});<commit_msg>grouping<commit_after>$(function () {
    dataset = $('#device-map').data('chart')
    var width = $('#device-map').width();
    var height = $('#device-map').height();
    var scale = 1.0

    var svg = d3.select("#device-map").append("svg").attr({
        width: $('#device-map').width(),
        height: $('#device-map').height(),
    });

    var xScale = d3.scale.linear()
        .domain([0, width])
        .range([0, width * scale]);

    var yScale = d3.scale.linear()
        .domain([0, height])
        .range([0, height * scale]);

    var tooltip = d3.select("body").select("#tooltip")
    var color = d3.scale.category10();
    var g = svg.selectAll("circle").data(dataset).enter().append("g");
    var a = g.append("a");
    a.attr("xlink:href", function (d) {
        return d["url"];
    })
        .on("mouseover", function (d) {
            return tooltip.style("visibility", "visible").text(d);
        })
        .on("mousemove", function (d) {
            return tooltip.style("top", (event.pageY - 20) + "px").style("left", (event.pageX + 10) + "px");
        })
        .on("mouseout", function (d) {
            return tooltip.style("visibility", "hidden");
        });

    var circle = a.append("circle");
    circle.attr("cx", function (d, i) {
        return xScale(d["x"]);
    }).attr("cy", function (d, i) {
        return yScale(d["y"]);
    }).attr("r", function (d) {
        return 10;
    }).attr("fill", function (d, i) {
        return color(i);
    });

    var text = g.append("text");
    text.text(function (d, i) {
        return d["name"];
    }).attr("x", function (d, i) {
        return xScale(d["x"] + 20);
    }).attr("y", function (d, i) {
        return yScale(d["y"] + 5);
    }).attr("fill", function (d, i) {
        return color(i);
    });
});
{'fraction_non_alphanumeric': 0.23034021193530396, 'fraction_numerical': 0.012269938650306749, 'mean_word_length': 2.459016393442623, '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': '951334', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1180, 'n_words': 255}