<commit_before><html>
<head>
  <link rel="stylesheet" href="cartodb.css" />
  <title>African University Presses</title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  <script src="cartodb.js"></script>
  <style>
    html, body {width:100%; height:100%; padding: 0; margin: 0;}
    #map { width: 100%; height:100%; background: white;}
    #menu { position: absolute; top: 5px; right: 10px; width: 150px; height:60px; z-index:10;}
    #menu a { 
      margin: 15px 10px 0 0;
      float: right;
      vertical-align: baseline;
      width: 120px;
      padding: 10px;
      text-align: center;
      font: bold 11px "Helvetica",Arial;
      line-height: normal;
      color: #555;
      border-radius: 5px;
      border: 1px solid #777777;
      background: #ffffff;
      text-decoration: none;
      cursor: pointer;
    }
    #menu a.selected,
    #menu a:hover { 
      background-color: #337ab7;
      color: white;
    }
    #info{
      margin: 15px 10px 0 0;
      font: 15px "Helvetica",Arial;
      color:#000;
      background: #ffffff;
      width:250px;
      height:269px;
      top:5px;
      left:60px;
      border: 1px solid #777777;
      border-radius: 5px;
      position: absolute;
      z-index: 11;
      padding: 10px;
      text-align: left;
      display: table-cell;
      vertical-align: center;
    }
    #info h2 {
      margin: -10px -10px;
      border-bottom: 1px solid #777777;
      border-radius: 5px 5px 0px 0px;
      padding: 10px;
      background-color: #337ab7;
      color: white;
      font-size: 16px;
    }
    #info h3 {
      margin-bottom: 0px;
    }
    #info a, #info a:visited {
      text-decoration:none;
      color: #337ab7;
      padding: 3px;
      margin: -3px;
    }
    #info a:hover {
      text-decoration:none;
      color: #FFF;
      background: #337ab7;
      border-radius: 3px;
    }

    #dataset a{
      font: bold 15px "Helvetica",Arial;
      color: #555;
      background: #ffffff;
      width:250px;
      height:18px;
      top:325px;
      left:60px;
      border: 1px solid #777777;
      border-radius: 5px;
      position: absolute;
      z-index: 11;
      padding: 10px;
      text-align: center;
      line-height: normal;
      cursor: pointer;
      text-decoration: none;
      cursor: pointer;
    }   
    #dataset a.selected,
    #dataset a:hover { 
      background-color: #337ab7;
      color: white; 
    }
    #feedback a{
      font: bold 15px "Helvetica",Arial;
      color: #555;
      background: #ffffff;
      width:250px;
      height:18px;
      top:379px;
      left:60px;
      border: 1px solid #777777;
      border-radius: 5px;
      position: absolute;
      z-index: 11;
      padding: 10px;
      text-align: center;
      vertical-align: middle;
      cursor: pointer;
      line-height: normal;
      text-decoration: none;
      cursor: pointer;
    }   
    #feedback a.selected,
    #feedback a:hover { 
      background-color: #337ab7;
      color: white;
    }

  </style>

  <script>
  var map;
    function init(){
  // initiate leaflet map
  map = new L.Map('map', { 
      center: [0,10],
      zoom: 3
  })


  L.tileLayer("http://a.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png", {
    attribution: '<a href="http://code4sa.org/" target="_blank">Code4SA</a>'
  }).addTo(map);

  var layerUrl = 'https://adi45.cartodb.com/api/v2/viz/1178935a-d175-11e5-bbae-0e31c9be1b51/viz.json';

  var sublayers = [];

  cartodb.createLayer(map, layerUrl)
  .addTo(map)
  .on('done', function(layer) {
    // change the query for the first layer
    var subLayerOptions = {
      sql: "SELECT * FROM african_university_presses",
      interactivity:"university_carto, university_press_carto, facebook_carto, twitter_carto, url_carto, repository_carto, open_access_carto, most_recent_carto",

    }

    var sublayer = layer.getSubLayer(0);
    sublayer.set(subLayerOptions);

sublayer.on('featureClick', function(e, latlng, pos, data, subLayerIndex) {
  console.log("clicked feature: " + data);
        university=data.university_carto;
        university_press=data.university_press_carto;
        most_recent=data.most_recent_carto;
        facebook=data.facebook_carto;
        open_access=data.open_access_carto;
        repository=data.repository_carto;
        twitter=data.twitter_carto;
        url=data.url_carto;

        var details = '<h2>'+university+'</h2><h3>'+university_press+'</h3><div class="details">';
        if (url) details +=url;
        details += '<p>'+facebook+' '+twitter+'</p><p>Open access: '+open_access+'</p>'+'<p>Most recent publication: '+most_recent+'<p>Institutional repository: '+repository+'</p></div>'

        info.innerHTML = details;

});

sublayer.on('mouseover', function() {
    $("#map").css('cursor', 'pointer');
});

sublayer.on('mouseout', function() {
    $("#map").css('cursor', 'auto');
});

sublayer.setInteraction(true);

    sublayers.push(sublayer);
  }).on('error', function() {
    //log the error
  })

  //we define the queries that will be performed when we click on the buttons, by modifying the SQL of our layer<commit_msg>recent publication tweak<commit_after><html>
<head>
  <link rel="stylesheet" href="cartodb.css" />
  <title>African University Presses</title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  <script src="cartodb.js"></script>
  <style>
    html, body {width:100%; height:100%; padding: 0; margin: 0;}
    #map { width: 100%; height:100%; background: white;}
    #menu { position: absolute; top: 5px; right: 10px; width: 150px; height:60px; z-index:10;}
    #menu a { 
      margin: 15px 10px 0 0;
      float: right;
      vertical-align: baseline;
      width: 120px;
      padding: 10px;
      text-align: center;
      font: bold 11px "Helvetica",Arial;
      line-height: normal;
      color: #555;
      border-radius: 5px;
      border: 1px solid #777777;
      background: #ffffff;
      text-decoration: none;
      cursor: pointer;
    }
    #menu a.selected,
    #menu a:hover { 
      background-color: #337ab7;
      color: white;
    }
    #info{
      margin: 15px 10px 0 0;
      font: 15px "Helvetica",Arial;
      color:#000;
      background: #ffffff;
      width:250px;
      height:269px;
      top:5px;
      left:60px;
      border: 1px solid #777777;
      border-radius: 5px;
      position: absolute;
      z-index: 11;
      padding: 10px;
      text-align: left;
      display: table-cell;
      vertical-align: center;
    }
    #info h2 {
      margin: -10px -10px;
      border-bottom: 1px solid #777777;
      border-radius: 5px 5px 0px 0px;
      padding: 10px;
      background-color: #337ab7;
      color: white;
      font-size: 16px;
    }
    #info h3 {
      margin-bottom: 0px;
    }
    #info a, #info a:visited {
      text-decoration:none;
      color: #337ab7;
      padding: 3px;
      margin: -3px;
    }
    #info a:hover {
      text-decoration:none;
      color: #FFF;
      background: #337ab7;
      border-radius: 3px;
    }

    #dataset a{
      font: bold 15px "Helvetica",Arial;
      color: #555;
      background: #ffffff;
      width:250px;
      height:18px;
      top:325px;
      left:60px;
      border: 1px solid #777777;
      border-radius: 5px;
      position: absolute;
      z-index: 11;
      padding: 10px;
      text-align: center;
      line-height: normal;
      cursor: pointer;
      text-decoration: none;
      cursor: pointer;
    }   
    #dataset a.selected,
    #dataset a:hover { 
      background-color: #337ab7;
      color: white; 
    }
    #feedback a{
      font: bold 15px "Helvetica",Arial;
      color: #555;
      background: #ffffff;
      width:250px;
      height:18px;
      top:379px;
      left:60px;
      border: 1px solid #777777;
      border-radius: 5px;
      position: absolute;
      z-index: 11;
      padding: 10px;
      text-align: center;
      vertical-align: middle;
      cursor: pointer;
      line-height: normal;
      text-decoration: none;
      cursor: pointer;
    }   
    #feedback a.selected,
    #feedback a:hover { 
      background-color: #337ab7;
      color: white;
    }

  </style>

  <script>
  var map;
    function init(){
  // initiate leaflet map
  map = new L.Map('map', { 
      center: [0,10],
      zoom: 3
  })


  L.tileLayer("http://a.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png", {
    attribution: '<a href="http://code4sa.org/" target="_blank">Code4SA</a>'
  }).addTo(map);

  var layerUrl = 'https://adi45.cartodb.com/api/v2/viz/1178935a-d175-11e5-bbae-0e31c9be1b51/viz.json';

  var sublayers = [];

  cartodb.createLayer(map, layerUrl)
  .addTo(map)
  .on('done', function(layer) {
    // change the query for the first layer
    var subLayerOptions = {
      sql: "SELECT * FROM african_university_presses",
      interactivity:"university_carto, university_press_carto, facebook_carto, twitter_carto, url_carto, repository_carto, open_access_carto, most_recent_carto",

    }

    var sublayer = layer.getSubLayer(0);
    sublayer.set(subLayerOptions);

sublayer.on('featureClick', function(e, latlng, pos, data, subLayerIndex) {
  console.log("clicked feature: " + data);
        university=data.university_carto;
        university_press=data.university_press_carto;
        most_recent=data.most_recent_carto;
        facebook=data.facebook_carto;
        open_access=data.open_access_carto;
        repository=data.repository_carto;
        twitter=data.twitter_carto;
        url=data.url_carto;

        var details = '<h2>'+university+'</h2><h3>'+university_press+'</h3><div class="details">';
        if (url) details +=url;
        details += '<p>'+facebook+' '+twitter+'</p><p>Open access: '+open_access+'</p>'+'<p>Latest publication as of 2015: '+most_recent+'<p>Institutional repository: '+repository+'</p></div>'

        info.innerHTML = details;

});

sublayer.on('mouseover', function() {
    $("#map").css('cursor', 'pointer');
});

sublayer.on('mouseout', function() {
    $("#map").css('cursor', 'auto');
});

sublayer.setInteraction(true);

    sublayers.push(sublayer);
  }).on('error', function() {
    //log the error
  })

  //we define the queries that will be performed when we click on the buttons, by modifying the SQL of our layer
{'fraction_non_alphanumeric': 0.14259456321950276, 'fraction_numerical': 0.042952500725549, 'mean_word_length': 2.598329272537417, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 4, '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': '6216478', 'n_tokens_mistral': 3924, 'n_tokens_neox': 3557, 'n_words': 771}