<commit_before>// on click of buttons, call data transition
$("#similarityAll").click( function() {
  d3.json("json/influence.json", function(error, json) {
    if (error) return console.warn(error);
    makeScatterplot(json, "similarityAll");
  });
});

$("#similarityEarlier").click( function() {
  d3.json("json/influence.json", function(error, json) {
    if (error) return console.warn(error);
    makeScatterplot(json, "similarityEarlier");
  });
});

$("#similarityLater").click( function() {
  d3.json("json/influence.json", function(error, json) {
    if (error) return console.warn(error);
    makeScatterplot(json, "similarityLater");
  });
});

////////////////////////////
// initialize scatterplot //
////////////////////////////

var margin = {top: 0, right: 70, left: 70, bottom: 50};   
var w = 900 - margin.left - margin.right;
var h = 500 - margin.top - margin.bottom;

var initializeScatterplot = function() {

  var svg = d3.select("#corpusPlot").append("svg")
    .attr("width", w + margin.left + margin.right)
    .attr("height", h + margin.top + margin.bottom);

  // add rectangle in which plot will be created 
  svg.append("rect")
    .attr("id", "plotBox")
    .attr("x", margin.left)
    .attr("y", margin.top)
    .attr("height", h)
    .attr("width", w)
    .attr("stroke", "#c4c4c4")
    .attr("stroke-width", 1)
    .attr("fill", "#ffffff");

  // add a label to the x axis
  svg.append("text")
      .attr("class", "x label")
      .attr("text-anchor", "end")
      .attr("x", (w+margin.left+margin.right)/2 + 10)
      .attr("y", h + margin.top + margin.bottom - 3)
      .style("font-size", "12.5")
      .style("font-weight", "normal")
      .text("Year");

  // add a label to the y axis
  svg.append("text")
    .attr("class", "y label")
    .attr("text-anchor", "end")
    .attr("y", 3)
    .attr("x", -((h+margin.top+margin.bottom)/2) +120)
    .attr("dy", ".75em")
    .style("font-size", "12.5")
    .style("font-weight", "normal")
    .attr("transform", "rotate(-90)")
    .text("Mean similarity");
}

initializeScatterplot();<commit_msg>adjusted y axis label in corpus view<commit_after>// on click of buttons, call data transition
$("#similarityAll").click( function() {
  d3.json("json/influence.json", function(error, json) {
    if (error) return console.warn(error);
    makeScatterplot(json, "similarityAll");
  });
});

$("#similarityEarlier").click( function() {
  d3.json("json/influence.json", function(error, json) {
    if (error) return console.warn(error);
    makeScatterplot(json, "similarityEarlier");
  });
});

$("#similarityLater").click( function() {
  d3.json("json/influence.json", function(error, json) {
    if (error) return console.warn(error);
    makeScatterplot(json, "similarityLater");
  });
});

////////////////////////////
// initialize scatterplot //
////////////////////////////

var margin = {top: 0, right: 70, left: 70, bottom: 50};   
var w = 900 - margin.left - margin.right;
var h = 500 - margin.top - margin.bottom;

var initializeScatterplot = function() {

  var svg = d3.select("#corpusPlot").append("svg")
    .attr("width", w + margin.left + margin.right)
    .attr("height", h + margin.top + margin.bottom);

  // add rectangle in which plot will be created 
  svg.append("rect")
    .attr("id", "plotBox")
    .attr("x", margin.left)
    .attr("y", margin.top)
    .attr("height", h)
    .attr("width", w)
    .attr("stroke", "#c4c4c4")
    .attr("stroke-width", 1)
    .attr("fill", "#ffffff");

  // add a label to the x axis
  svg.append("text")
      .attr("class", "x label")
      .attr("text-anchor", "end")
      .attr("x", (w+margin.left+margin.right)/2 + 10)
      .attr("y", h + margin.top + margin.bottom - 3)
      .style("font-size", "12.5")
      .style("font-weight", "normal")
      .text("Year");

  // add a label to the y axis
  svg.append("text")
    .attr("class", "y label")
    .attr("text-anchor", "end")
    .attr("y", 3)
    .attr("x", -((h+margin.top+margin.bottom)/2) +75)
    .attr("dy", ".75em")
    .style("font-size", "12.5")
    .style("font-weight", "normal")
    .attr("transform", "rotate(-90)")
    .text("Mean similarity");
}

initializeScatterplot();
{'fraction_non_alphanumeric': 0.23076923076923078, 'fraction_numerical': 0.018872431915910176, 'mean_word_length': 2.961210974456008, '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': '6300791', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1410, 'n_words': 319}