<commit_before>//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Draws "square" and "circle" shapes using svg:rect
//------------------------------------------------------------------------------
d3plus.shape.coordinates = function(vars,selection,enter,exit) {
  
  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  // Define the geographical projection
  //----------------------------------------------------------------------------
  var projection = d3.geo.mercator()
  
  var clip = d3.geo.clipExtent()
      .extent([[0, 0], [vars.app_width, vars.app_height]]);
      
  if (!vars.zoom.scale) {
    vars.zoom.scale = 1
  }
      
  vars.zoom.area = 1/vars.zoom.scale/vars.zoom.scale
  
  // console.log(vars.zoom)

  var simplify = d3.geo.transform({
    point: function(x, y, z) {
      // console.log(z,vars.zoom.area)
      if (z >= vars.zoom.area) this.stream.point(x,y);
    }
  });
  
  var path = d3.geo.path()
    .projection(projection)
    // .projection(simplify)<commit_msg>support for different projection types<commit_after>//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Draws "square" and "circle" shapes using svg:rect
//------------------------------------------------------------------------------
d3plus.shape.coordinates = function(vars,selection,enter,exit) {
  
  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  // Define the geographical projection
  //----------------------------------------------------------------------------
  var projection = d3.geo[vars.coords.projection.value]()
  
  var clip = d3.geo.clipExtent()
      .extent([[0, 0], [vars.app_width, vars.app_height]]);
      
  if (!vars.zoom.scale) {
    vars.zoom.scale = 1
  }
      
  vars.zoom.area = 1/vars.zoom.scale/vars.zoom.scale
  
  // console.log(vars.zoom)

  // var simplify = d3.geo.transform({
  //   point: function(x, y, z) {
  //     if (z >= vars.zoom.area) this.stream.point(x,y);
  //   }
  // });
  
  var path = d3.geo.path()
    .projection(projection)
    // .projection(simplify)
{'fraction_non_alphanumeric': 0.4101123595505618, 'fraction_numerical': 0.008426966292134831, 'mean_word_length': 1.883940620782726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2852359', 'n_tokens_mistral': 663, 'n_tokens_neox': 647, 'n_words': 98}