<commit_before>function cargaGeoJson(ruta, capa){
    $.getJSON(ruta, function(data){

          L.geoJson(data).addTo(capa);

          L.geoJson(data, {onEachFeature: popup}).addTo(capa);

          function popup(feature, layer) { 
              /*if (feature.properties && feature.properties.ID_PARCELA) { 
                  layer.bindPopup('ID_PARCELA: ' + feature.properties.ID_PARCELA + ' <br>' +
                                  'NOMBRE: ' + feature.properties.NOMBRE + '<br>' +
                                  'CONF_N: ' + feature.properties.CONF_N + '<br>' +
                                  'CONF_S: ' + feature.properties.CONF_S + '<br>' +
                                  'CONF_E: ' + feature.properties.CONF_E + '<br>' +
                                  'CONF_O: ' + feature.properties.CONF_O+ '<br>' 
                                  ); 
              */
              if (feature.properties) {
                layer.bindPopup('ID_PROYECT: ' + feature.properties.ID_PROYECT + ' <br>' +
                                  'ID_PARCELA: ' + feature.properties.ID_PARCELA + ' <br>' +
                                  'COD_AFEC: ' + feature.properties.COD_AFEC,
                                 {closeButton: false, offset: L.point(0, -20)});
                layer.on('mouseover', function() { layer.openPopup(); });
                layer.on('mouseout', function() { layer.closePopup(); });
              } 
          }
    });
}

var map = L.map( 'map', {
    center: [43.143031, -2.106940],
    minZoom: 9,
    zoom: 10
    //layers: [openStreetMap, b5m]<commit_msg>metemos colores en función del tipo de afección<commit_after>function getColor(d) {
return  d === 1 ? '#800026' : 
        d === 2 ? '#BD0026' : 
        d === 3 ? '#FEB24C' : 
        d === 4 ? '#FC4E2A' : 
        d === 5 ? '#FD8D3C' : 
        d === 6 ? '#E31A1C' : 
        d === 7 ? '#FED976' : 
                  '#FFEDA0'; 
}

function style(feature) { 
  return { 
      fillColor: getColor(feature.properties.COD_AFEC), 
      weight: 2, 
      opacity: 1, 
      color: 'white', 
      dashArray: '3', 
      fillOpacity: 0.7 
  }; 
}

function cargaGeoJson(ruta, capa){
    $.getJSON(ruta, function(data){

          L.geoJson(data).addTo(capa);

          L.geoJson(data, {onEachFeature: popup , style: style}).addTo(capa);

          function popup(feature, layer) { 
              /*if (feature.properties && feature.properties.ID_PARCELA) { 
                  layer.bindPopup('ID_PARCELA: ' + feature.properties.ID_PARCELA + ' <br>' +
                                  'NOMBRE: ' + feature.properties.NOMBRE + '<br>' +
                                  'CONF_N: ' + feature.properties.CONF_N + '<br>' +
                                  'CONF_S: ' + feature.properties.CONF_S + '<br>' +
                                  'CONF_E: ' + feature.properties.CONF_E + '<br>' +
                                  'CONF_O: ' + feature.properties.CONF_O+ '<br>' 
                                  ); 
              */
              if (feature.properties) {
                layer.bindPopup('ID_PROYECT: ' + feature.properties.ID_PROYECT + ' <br>' +
                                  'ID_PARCELA: ' + feature.properties.ID_PARCELA + ' <br>' +
                                  'COD_AFEC: ' + feature.properties.COD_AFEC,
                                 {closeButton: false, offset: L.point(0, -20)});
                layer.on('mouseover', function() { layer.openPopup(); });
                layer.on('mouseout', function() { layer.closePopup(); });
              } 
          }
    });
}

var map = L.map( 'map', {
    center: [43.143031, -2.106940],
    minZoom: 9,
    zoom: 10
    //layers: [openStreetMap, b5m]
{'fraction_non_alphanumeric': 0.15037796976241902, 'fraction_numerical': 0.02132829373650108, 'mean_word_length': 1.4231523871811642, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7278087', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1137, 'n_words': 184}