<commit_before>var draw_map = function(x, y) {
  var map = L.map('map').setView([x, y], 4);

  L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
      attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
  }).addTo(map);

  var style = function(feature) {
    return {
      weight: 2,
      opacity: 1,
      color: 'white',
      dashArray: '3',
      //fillColor: '#DDA0DD',
      fillColor: '#E6FF00',
      fillOpacity: 0.5,
    }
  }

  $.get("https://gist.githubusercontent.com/tjmcewan/ce917fb3af63a4700426/raw/70828859b4493f241e32ae2beb9beaa3f691252a/response.json", function(body) {
    var parsed_body = $.parseJSON(body);
    for(var i = 0; i < parsed_body.hits.hits.length; i++) {
      var polygon = L.geoJson(parsed_body.hits.hits[i]._source.location, { style: style }).addTo(map);
    }

    L.marker([-28.5381470905, 150.286818304]).addTo(map)
        .bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
        .openPopup();
//L.multipolygon(body["hits"]["hits"][0]
  })

  /*
  L.marker([-29.8650, 131.2094]).addTo(map)
      .bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
      .openPopup();
      */

}

$('#map').height($(window).height());
$('#map').width($(window).width());
draw_map(-29.8650, 131.2094);

<commit_msg>Updates map, interactive mesh boxes<commit_after>var draw_map = function(x, y) {
  var map = L.map('map').setView([x, y], 4);

  //L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
  L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
      attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
  }).addTo(map);



  //$.get("https://gist.githubusercontent.com/tjmcewan/ce917fb3af63a4700426/raw/70828859b4493f241e32ae2beb9beaa3f691252a/response.json", function(body) {
//      var polygon = L.geoJson(parsed_body.hits.hits[i]._source.location, { style: style }).addTo(map);
  $.get("https://gist.githubusercontent.com/tjmcewan/ccefff4ee4baad9fc555/raw/1924f6bcc4b5e4a2c95790d1b7c207cf784cf1c5/inside_territories.json", function(body) {
    var mesh_boxes;
    var selected_boxes = new Object();

    var style = function(feature) {
      //console.log("Feature " + feature.properties.slug);
      return {
        weight: 2,
        opacity: 1,
        color: 'white',
        dashArray: '3',
        //fillColor: '#DDA0DD',
        //fillColor: '#E6FF00',
        fillColor: '#F0054C',
        fillOpacity: 0.5,
      }
    }

    var hightlightMeshBox = function(e) {
      var layer = e.target;

      layer.setStyle({
        weight: 3,
        color: '#666',
        dashArray: '',
        fillColor: '#E6FF00',
      });

      if (!L.Browser.ie && !L.Browser.opera) {
        layer.bringToFront();
      }
    }

    var resetMeshBox = function(e) {
      mesh_boxes.resetStyle(e.target);
    }

    /*
    var selectMeshBox = function(e) {
      puts "
    }
    */

    var onEachFeature = function(feature, layer) {
      layer.on({
        mouseover: hightlightMeshBox,
        mouseout: resetMeshBox,
     //   click: selectMeshBox,
      });
    }

    mesh_boxes = L.geoJson(
                    {"type": 'FeatureCollection', "features": $.parseJSON(body)},
                    { style: style, onEachFeature: onEachFeature }
                  ).addTo(map);

    map.fitBounds(mesh_boxes.getBounds());

  })
}

$('#map').height($(window).height());
$('#map').width($(window).width());
draw_map(-29.8650, 131.2094);


{'fraction_non_alphanumeric': 0.18683834048640915, 'fraction_numerical': 0.05894134477825465, 'mean_word_length': 2.775377969762419, 'pattern_counts': {'":': 2, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 3, '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': '7427219', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1300, 'n_words': 186}