<commit_before><!DOCTYPE html>
<meta charset="utf-8">
<style>
.chart {
    font: 10px sans-serif;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.box {
  font: 10px sans-serif;
}

.box line,
.box rect,
.box circle {
  fill: #fff;
  stroke: #000;
  stroke-width: 1.5px;
}

.box .center {
  stroke-dasharray: 3,3;
}

.box .outlier {
  fill: none;
  stroke: #ccc;
}

</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<!--<script src="box.js"></script>-->
<script>

var width = 600,
    height = 500,
    mx = 30, //x margin
    my = 15; //y margin

var globalmin = Infinity,
    globalmax = -Infinity;

var chart = d3.select("body").append("svg")
    .attr("class", "chart")
    .attr("width", width + 2*mx)
    .attr("height", height + 2*my)
  .append("g")
    .attr("transform", "translate(" + mx + "," + my + ")");

d3.csv("champsleague.csv", function(error, csv) {
  var data = [];

  csv.forEach(function(row) {
    row.min = parseFloat(row.min);
    row.max = parseFloat(row.max);
    row.mean = parseFloat(row.mean);
    row.median = parseFloat(row.median);
    //TODO: 25th and 75th
    data.push(row);

    if (row.median > globalmax) globalmax = row.median;
    if (row.median < globalmin) globalmin = row.median;
  });
  console.log(data, globalmin, globalmax);

  var groups = ["A", "B", "C", "D", "E", "F", "G", "H"]

  var x = d3.scale.ordinal()
      .domain(groups)
      .rangeBands([0, width])

  var y = d3.scale.log()
    .domain([1, 100])
    .range([0, height])

  // y axis ticks
  chart.selectAll(".yaxistick")
      .data(y.ticks(10))
    .enter().append("line")
      .attr("class", "yaxistick")
      .attr("x1", 0)
      .attr("x2", width)
      .attr("y1", function(d) { return height - y(d); })
      .attr("y2", function(d) { return height - y(d); })
      .style("stroke", "#ccc")

  // black baseline
  chart.append("line")
      .attr("x1", 0)
      .attr("x2", width)
      .attr("y1", height)
      .attr("y2", height)
      .style("stroke", "#000")

  // y axis labels
  chart.selectAll(".yaxislabel")
      .data(y.ticks(8))
    .enter().append("text")
      .attr("class", "yaxislabel")
      .attr("x", 0)
      .attr("y", function(d) { return height - y(d); })
      .attr("dx", -10)
      .attr("text-anchor", "middle")
      .text(String);

  // x axis labels
  chart.selectAll(".xaxislabel")
      .data(groups)
    .enter().append("text")
      .attr("class", "xaxislabel")
      .attr("x", function(d) { return x(d) + x.rangeBand()/2; })
      .attr("y", function() { return height + my; })
      .attr("text-anchor", "middle")
      .text(String);

  chart.selectAll(".teamname")
      .data(data)
    .enter().append("text")
      .attr("class", "teamname")
      .attr("x", function(d) { return x(d.group) + x.rangeBand()/2; })
      .attr("y", function(d) { return height - y(d.median); })
      .attr("text-anchor", "middle")
      .text(function(d) { return d.team; })
});
</script><commit_msg>pct likelihood to win rather than odds<commit_after><!DOCTYPE html>
<meta charset="utf-8">
<style>
.chart {
    font: 12px sans-serif;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.yaxislabel {
    font: 10px sans-serif;
    fill: #ccc;
}

</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<!--<script src="box.js"></script>-->
<script>

var width = 900,
    height = 500,
    mx = 30, //x margin
    my = 15; //y margin

var chart = d3.select("body").append("svg")
    .attr("class", "chart")
    .attr("width", width + 2*mx)
    .attr("height", height + 2*my)
  .append("g")
    .attr("transform", "translate(" + mx + "," + my + ")");

d3.csv("champsleague.csv", function(error, csv) {
  var data = [];

  csv.forEach(function(row) {
    row.min = parseFloat(row.min);
    row.max = parseFloat(row.max);
    row.mean = parseFloat(row.mean);
    row.median = parseFloat(row.median);
    row.pct = 100/row.median;
    //TODO: 25th and 75th
    data.push(row);
  });
  console.log(data);

  var groups = ["A", "B", "C", "D", "E", "F", "G", "H"]

  var x = d3.scale.ordinal()
      .domain(groups)
      .rangeBands([0, width])

  var y = d3.scale.log()
    .domain([1, 100])
    .range([0, height])

  // y axis ticks
  chart.selectAll(".yaxistick")
      .data(y.ticks(10))
    .enter().append("line")
      .attr("class", "yaxistick")
      .attr("x1", 0)
      .attr("x2", width)
      .attr("y1", function(d) { return height - y(d); })
      .attr("y2", function(d) { return height - y(d); })
      .style("stroke", "#eee")

  // black baseline
  chart.append("line")
      .attr("x1", 0)
      .attr("x2", width)
      .attr("y1", height)
      .attr("y2", height)
      .style("stroke", "#000")

  // y axis labels
  chart.selectAll(".yaxislabel")
      .data(y.ticks(8))
    .enter().append("text")
      .attr("class", "yaxislabel")
      .attr("x", 0)
      .attr("y", function(d) { return height - y(d); })
      .attr("dx", -10)
      .attr("text-anchor", "middle")
      .text(String);

  // x axis labels
  chart.selectAll(".xaxislabel")
      .data(groups)
    .enter().append("text")
      .attr("class", "xaxislabel")
      .attr("x", function(d) { return x(d) + x.rangeBand()/2; })
      .attr("y", function() { return height + my; })
      .attr("text-anchor", "middle")
      .text(String);

  chart.selectAll(".teamname")
      .data(data)
    .enter().append("text")
      .attr("class", "teamname")
      .attr("x", function(d) { return x(d.group) + x.rangeBand()/2; })
      .attr("y", function(d) { return height - y(d.pct); })
      .attr("text-anchor", "middle")
      .text(function(d) { return d.team; })
});
</script>
{'fraction_non_alphanumeric': 0.22353148083010904, 'fraction_numerical': 0.021104467112205417, 'mean_word_length': 2.6595881595881594, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, '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': '1483090', 'n_tokens_mistral': 2259, 'n_tokens_neox': 2140, 'n_words': 444}