<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <link href="../src/vizwhiz.css" rel="stylesheet" type="text/css">
  <style>

  body {
  
  }

  </style>
</head>
<body>

<div id="viz"></div>

<script src="../lib/d3.js"></script>
<script src="../lib/d3.geo.tile.js"></script>
<script src="../lib/topojson.js"></script>
<script src="../lib/modernizr.custom.js"></script>
<script src="../src/general.js"></script>
<script src="../src/utils.js"></script>
<script src="../src/viz/geo_map.js"></script>
<script>

  var width = 1100,
      height = 700;
    
  d3.json("data/geo/mg_munic.json", function(shapes) {
    d3.json("data/geo/land.json", function(land) {
      d3.json("data/munic_mg.json", function(geo_data) {
        d3.json("data/attr_munic.json", function(attr) {
        
          geo_data = geo_data.filter(function(d){ return d.year == 2010; })
          
          data = {}
          geo_data.forEach(function(d){
            var id = attr[d.id].id_mdic
            data[id] = geo_data.filter(function(f){return f.id == d.id})[0]
            // console.log(d.id,data[d.id],attr[d.id])
            data[id] = vizwhiz.utils.merge(data[id],attr[d.id])
            delete data[id].year
            delete data[id].attr_type
          })
          
          viz = vizwhiz.viz.geo_map()
            .width(width)
            .height(height)
            .coords(shapes)
            .background(land)
            .id_var("id")
            .value_var("wage")
            .text_var("name");
          
          d3.select("#viz")
            .datum(data)
            .call(viz);
        
        });
      });
    });
  });
  

</script>
</body>
</html><commit_msg>added support for new tooltip<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <link href="../src/vizwhiz.css" rel="stylesheet" type="text/css">
  <style>

  body {
    margin: 0px;
  }

  </style>
</head>
<body>

<div id="viz"></div>

<script src="../lib/d3.js"></script>
<script src="../lib/d3.geo.tile.js"></script>
<script src="../lib/topojson.js"></script>
<script src="../lib/modernizr.custom.js"></script>
<script src="../src/general.js"></script>
<script src="../src/utils.js"></script>
<script src="../src/tooltip.js"></script>
<script src="../src/viz/geo_map.js"></script>
<script>

  var width = window.innerWidth,
      height = window.innerHeight;
    
  d3.json("data/geo/mg_munic.json", function(shapes) {
    d3.json("data/geo/land.json", function(land) {
      d3.json("data/munic_mg.json", function(geo_data) {
        d3.json("data/attr_munic.json", function(attr) {
        
          geo_data = geo_data.filter(function(d){ return d.year == 2010; })
          
          data = {}
          geo_data.forEach(function(d){
            var id = attr[d.id].id_mdic
            data[id] = geo_data.filter(function(f){return f.id == d.id})[0]
            // console.log(d.id,data[d.id],attr[d.id])
            data[id] = vizwhiz.utils.merge(data[id],attr[d.id])
            delete data[id].year
            delete data[id].attr_type
          })
          
          viz = vizwhiz.viz.geo_map()
            .width(width)
            .height(height)
            .coords(shapes)
            .background(land)
            .id_var("id")
            .value_var("wage")
            .text_var("name")
            .tooltip(["id","id_mdic","wage","num_emp","num_est"]);
          
          d3.select("#viz")
            .datum(data)
            .call(viz);
        
        });
      });
    });
  });
  

</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.20101351351351351, 'fraction_numerical': 0.009572072072072071, 'mean_word_length': 2.0008445945945947, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '4637620', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1253, 'n_words': 170}