<commit_before>(function (widget) {
    // Roughly following http://bl.ocks.org/mbostock/4063269
    var diameter = 600,
        className = "averageJobBuildTime";

    var buildRuntimeAsBubbles = function (pipeline) {
        return Object.keys(pipeline).map(function (jobName) {
            var avgRuntime = pipeline[jobName].averageRuntime;
            return {
                name: jobName,
                title: jobName + ': ' + avgRuntime,
                value: avgRuntime
            };
        });
    };

    var svg = widget.create("Average Job Build Time","Color: jobGroup, Diameter: avg. Runtime")
            .svg(diameter)
            .attr("class", className);

    var bubble = d3.layout.pack()
            .sort(null)
            .size([diameter, diameter])
            .padding(1.5),
        noGrouping = function (bubbleNodes) {
            return bubbleNodes.filter(function(d) { return !d.children; });
        };

    var color = d3.scale.category20c();

    d3.json('/pipeline', function (_, root) {
        var node = svg.selectAll("g")
                .data(noGrouping(bubble.nodes({children: buildRuntimeAsBubbles(root)})))
                .enter()
                .append("g")
                .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });;

        node.append("title")
            .text(function(d) { return d.title; });

        node.append("circle")
            .attr("r", function (d) { return d.r; })
            .style("fill", function(d) {
                var jobGroup = d.name.split(' ')[0];
                return color(jobGroup);
            });

        node.append("text")
            .style("text-anchor", "middle")
            .each(function (d) {
                widget.textWithLineBreaks(this, d.name.split(' '));
            });
    });
}(widget));
<commit_msg>Only show job runtime for jobs with sufficient data<commit_after>(function (widget) {
    // Roughly following http://bl.ocks.org/mbostock/4063269
    var diameter = 600,
        className = "averageJobBuildTime";

    var buildRuntimeAsBubbles = function (pipeline) {
        return Object.keys(pipeline)
            .filter(function (jobName) {
                return pipeline[jobName].averageRuntime;
            })
            .map(function (jobName) {
                var avgRuntime = pipeline[jobName].averageRuntime;
                return {
                    name: jobName,
                    title: jobName + ': ' + avgRuntime,
                    value: avgRuntime
                };
            });
    };

    var svg = widget.create("Average Job Build Time","Color: jobGroup, Diameter: avg. Runtime")
            .svg(diameter)
            .attr("class", className);

    var bubble = d3.layout.pack()
            .sort(null)
            .size([diameter, diameter])
            .padding(1.5),
        noGrouping = function (bubbleNodes) {
            return bubbleNodes.filter(function(d) { return !d.children; });
        };

    var color = d3.scale.category20c();

    d3.json('/pipeline', function (_, root) {
        var node = svg.selectAll("g")
                .data(noGrouping(bubble.nodes({children: buildRuntimeAsBubbles(root)})))
                .enter()
                .append("g")
                .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });;

        node.append("title")
            .text(function(d) { return d.title; });

        node.append("circle")
            .attr("r", function (d) { return d.r; })
            .style("fill", function(d) {
                var jobGroup = d.name.split(' ')[0];
                return color(jobGroup);
            });

        node.append("text")
            .style("text-anchor", "middle")
            .each(function (d) {
                widget.textWithLineBreaks(this, d.name.split(' '));
            });
    });
}(widget));

{'fraction_non_alphanumeric': 0.14922680412371134, 'fraction_numerical': 0.009278350515463918, 'mean_word_length': 1.7177871148459383, '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': '2223422', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1080, 'n_words': 213}