<commit_before>var LargeLotsAdmin = LargeLotsAdmin || {};
var LargeLotsAdmin = {

  map: null,
  map_centroid: [41.493, -81.681],
  defaultZoom: 12,
  lastClickedLayer: null,
  geojson: null,
  marker: null,
  locationScope: 'cleveland',
  boundingBox: {
    'bottom': 41.386,
    'top': 41.872,
    'right': -81.208,
    'left': -81.968
  },

  initialize: function() {

      if (!LargeLotsAdmin.map) {
        LargeLotsAdmin.map = L.map('map-admin', {
          center: LargeLotsAdmin.map_centroid,
          zoom: LargeLotsAdmin.defaultZoom,
          scrollWheelZoom: false,
          tapTolerance: 30
        });
      }
      // render a map!
      L.Icon.Default.imagePath = '/static/images/'

      L.tileLayer('https://{s}.tiles.mapbox.com/v3/cwang912.kdf41n23/{z}/{x}/{y}.png', {
          attribution: '<a href="http://www.mapbox.com/about/maps/" target="_blank">Terms &amp; Feedback</a>'
      }).addTo(LargeLotsAdmin.map);

      LargeLotsAdmin.info = L.control({position: 'bottomright'});

      LargeLotsAdmin.info.onAdd = function (map) {
          this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info"
          this.update();
          return this._div;
      };

      // method that we will use to update the control based on feature properties passed
      // variables of props determined from cartoDB file
      LargeLotsAdmin.info.update = function (props) {
        var date_formatted = '';
        if (props) {
          var info = '';
          if(props.street_number){
              info += "<h4>" + LargeLotsAdmin.formatAddress(props) + "</h4>";
              info += "<p>PPN: " + props.parcel + "<br />";
          }
          // if (props.zoning_classification){
          //     info += "Zoned: " + props.zoning_classification + "<br />";
          // }
          if (props.sq_ft){
              info += "Sq Ft: " + props.sq_ft + "<br />";
          }
          this._div.innerHTML  = info;
        }
      };

      LargeLotsAdmin.info.clear = function(){
          this._div.innerHTML = '';
      }

      LargeLotsAdmin.info.addTo(LargeLotsAdmin.map);

      var fields = "ppn,parcel,address,build,ward,spa,sqft,street2,number2" //"pin14,zoning_classification,ward,street_name,street_dir,street_number,street_type,city_owned,residential"
      var layerOpts = {
          user_name: 'opencleveland',
          type: 'cartodb',
          cartodb_logo: false,
          sublayers: [
              {
                  sql: "SELECT * FROM joined WHERE (street2 != '') AND (number2 > 0)",
                  cartocss: $('#egp-styles').html().trim(),
                  interactivity: fields
              }
              // {
              //     sql: 'select * from east_garfield_park',
              //     cartocss: "#east_garfield_park{polygon-fill: #ffffcc;polygon-opacity: 0.2;line-color: #FFF;line-width: 3;line-opacity: 1;}"
              // }
          ]
      }

      // var fields = "pin14,zoning_classification,ward,street_name,street_dir,street_number,street_type,city_owned,residential"
      // var layerOpts = {
      //     user_name: 'datamade',
      //     type: 'cartodb',
      //     cartodb_logo: false,
      //     sublayers: [
      //
      //         {
      //             sql: "select * from egp_parcels where city_owned='T' and residential='T' and alderman_hold != 'T'",
      //             cartocss: $('#egp-styles').html().trim(),
      //             interactivity: fields
      //         },
      //         {
      //             sql: "select * from egp_parcels where pin14 in (" + applied_pins + ")",
      //             cartocss: $('#egp-styles-applied').html().trim(),
      //             interactivity: fields
      //         },
      //         {
      //             sql: 'select * from east_garfield_park',
      //             cartocss: "#east_garfield_park{polygon-fill: #ffffcc;polygon-opacity: 0.2;line-color: #FFF;line-width: 3;line-opacity: 1;}"
      //         }
      //     ]
      // }

      cartodb.createLayer(LargeLotsAdmin.map, layerOpts)
        .addTo(LargeLotsAdmin.map)
        .done(function(layer) {
            LargeLotsAdmin.lotsLayer = layer.getSubLayer(0);
            LargeLotsAdmin.lotsLayer.setInteraction(true);

            LargeLotsAdmin.lotsLayer.on('featureOver', function(e, latlng, pos, data, subLayerIndex) {
              $('#map-admin div').css('cursor','pointer');
              LargeLotsAdmin.info.update(data);
            });<commit_msg>try to add coloring for applied lots<commit_after>var LargeLotsAdmin = LargeLotsAdmin || {};
var LargeLotsAdmin = {

  map: null,
  map_centroid: [41.493, -81.681],
  defaultZoom: 12,
  lastClickedLayer: null,
  geojson: null,
  marker: null,
  locationScope: 'cleveland',
  boundingBox: {
    'bottom': 41.386,
    'top': 41.872,
    'right': -81.208,
    'left': -81.968
  },

  initialize: function() {

      if (!LargeLotsAdmin.map) {
        LargeLotsAdmin.map = L.map('map-admin', {
          center: LargeLotsAdmin.map_centroid,
          zoom: LargeLotsAdmin.defaultZoom,
          scrollWheelZoom: false,
          tapTolerance: 30
        });
      }
      // render a map!
      L.Icon.Default.imagePath = '/static/images/'

      L.tileLayer('https://{s}.tiles.mapbox.com/v3/cwang912.kdf41n23/{z}/{x}/{y}.png', {
          attribution: '<a href="http://www.mapbox.com/about/maps/" target="_blank">Terms &amp; Feedback</a>'
      }).addTo(LargeLotsAdmin.map);

      LargeLotsAdmin.info = L.control({position: 'bottomright'});

      LargeLotsAdmin.info.onAdd = function (map) {
          this._div = L.DomUtil.create('div', 'info'); // create a div with a class "info"
          this.update();
          return this._div;
      };

      // method that we will use to update the control based on feature properties passed
      // variables of props determined from cartoDB file
      LargeLotsAdmin.info.update = function (props) {
        var date_formatted = '';
        if (props) {
          var info = '';
          if(props.street_number){
              info += "<h4>" + LargeLotsAdmin.formatAddress(props) + "</h4>";
              info += "<p>PPN: " + props.parcel + "<br />";
          }
          // if (props.zoning_classification){
          //     info += "Zoned: " + props.zoning_classification + "<br />";
          // }
          if (props.sq_ft){
              info += "Sq Ft: " + props.sq_ft + "<br />";
          }
          this._div.innerHTML  = info;
        }
      };

      LargeLotsAdmin.info.clear = function(){
          this._div.innerHTML = '';
      }

      LargeLotsAdmin.info.addTo(LargeLotsAdmin.map);

      var fields = "ppn,parcel,address,build,ward,spa,sqft,street2,number2" //"pin14,zoning_classification,ward,street_name,street_dir,street_number,street_type,city_owned,residential"
      var layerOpts = {
          user_name: 'opencleveland',
          type: 'cartodb',
          cartodb_logo: false,
          sublayers: [
              {
                  sql: "SELECT * FROM joined WHERE (street2 != '') AND (number2 > 0)",
                  cartocss: $('#egp-styles').html().trim(),
                  interactivity: fields
              }
              // {
              //     sql: 'select * from east_garfield_park',
              //     cartocss: "#east_garfield_park{polygon-fill: #ffffcc;polygon-opacity: 0.2;line-color: #FFF;line-width: 3;line-opacity: 1;}"
              // }
          ]
      }

      var fields = "ppn,parcel,address,build,ward,spa,sqft,street2,number2"
      var layerOpts = {
          user_name: 'opencleveland',
          type: 'cartodb',
          cartodb_logo: false,
          sublayers: [

              {
                  sql: "SELECT * FROM joined WHERE (street2 != '') AND (number2 > 0)",
                  cartocss: $('#egp-styles').html().trim(),
                  interactivity: fields
              },
              {
                  sql: "SELECT * FROM joined WHERE ppn in (" + applied_pins + ")",
                  cartocss: $('#egp-styles-applied').html().trim(),
                  interactivity: fields
              }
              // },
              // {
              //     sql: 'select * from east_garfield_park',
              //     cartocss: "#east_garfield_park{polygon-fill: #ffffcc;polygon-opacity: 0.2;line-color: #FFF;line-width: 3;line-opacity: 1;}"
              // }
          ]
      }

      cartodb.createLayer(LargeLotsAdmin.map, layerOpts)
        .addTo(LargeLotsAdmin.map)
        .done(function(layer) {
            LargeLotsAdmin.lotsLayer = layer.getSubLayer(0);
            LargeLotsAdmin.lotsLayer.setInteraction(true);

            LargeLotsAdmin.lotsLayer.on('featureOver', function(e, latlng, pos, data, subLayerIndex) {
              $('#map-admin div').css('cursor','pointer');
              LargeLotsAdmin.info.update(data);
            });
{'fraction_non_alphanumeric': 0.14702897733679107, 'fraction_numerical': 0.014545044537151877, 'mean_word_length': 1.856682769726248, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 22, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6867207', 'n_tokens_mistral': 2879, 'n_tokens_neox': 2723, 'n_words': 476}