<commit_before>var lg =  {

	mapRegister:'',
	_gridRegister:'',
	_colors:['#edf8fb','#b2e2e2','#66c2a4','#2ca25f','#006d2c'],
    _selectedBar:-1,

	init: function(){
		this.mapRegister.init();
		this._gridRegister.init();
	},

	update: function(){
		console.log('update');
	},

	colors:function(val){
        if(typeof val === 'undefined'){
            return this._colors;
        } else {
            this._colors=val;
            return this;
        }        
    },

	map: function(id){

		this._id = id;
        this._geojson = "";
        this._center = [0,0];
        this._zoom = 1;
        this._joinAttr = "";
        this._map = '';

        lg.mapRegister = this;

        this.geojson = function(val){
            if(typeof val === 'undefined'){
                return this._geojson;
            } else {
                this._geojson=val;
                return this;
            }        
        };

		this.center = function(val){
            if(typeof val === 'undefined'){
                return this._center;
            } else {
                this._center=val;
                return this;
            }        
        };


		this.zoom = function(val){
            if(typeof val === 'undefined'){
                return this._zoom;
            } else {
                this._zoom=val;
                return this;
            }        
        };

        this.joinAttr = function(val){
            if(typeof val === 'undefined'){
                return this._joinAttr;
            } else {
                this._joinAttr=val;
                return this;
            }        
        };

        this._style = function(feature){
            console.log(lg.mapRegister._joinAttr);
            console.log(feature.properties[lg.mapRegister._joinAttr]);
            return {
                weight: 1,
                opacity: 0.8,
                color:'#000000',
                fillOpacity: 0,
                className: 'dashgeom dashgeom'+feature.properties[lg.mapRegister._joinAttr]
            };
        };        

        this.init = function(){
        	this._map = this._initMap(this._id,this._geojson,this._center,this._zoom,this._joinAttr);
        }  

        this._initMap = function(id,geojson, center, zoom, joinAttr){

			var baselayer = L.tileLayer('https://data.hdx.rwlabs.org/mapbox-base-tiles/{z}/{x}/{y}.png', {
            	
        	});

            var map = L.map('map', {
                center: center,
                zoom: zoom,
                layers: [baselayer]
            });

            var overlay = L.geoJson(geojson,{
                style: this._style
            }).addTo(map);

            return map;            
        }

        this.colorMap = function (data){
        	var _parent = this;

        	data.sort(function(a, b) {
    			return parseFloat(a.value) - parseFloat(b.value);
			});

        	data.forEach(function(d,i){
        		var c = Math.floor(i/data.length*5);
        		d3.selectAll('.dashgeom'+d.key).attr('fill',lg._colors[c]).attr('fill-opacity',0.8);
        	});
        }
    },

    grid: function(id){

    	this._id = id;
    	this._width = 1000;
    	this._height = 500;
    	this._data = [];
    	this._nameAttr = '';
    	this._joinAttr = '';
    	this._valuesList = [];
    	this._properties = {};
    	this._vWhiteSpace = 1;
    	this._hWhiteSpace = 1;
        this._properties.margin = {top: 120, right: 50, bottom: 20, left: 120};
    	lg._gridRegister = this;

    	this.width = function(val){
            if(typeof val === 'undefined'){
                return this._width;
            } else {
                this._width=val;
                return this;
            }        
        };

		this.height = function(val){
            if(typeof val === 'undefined'){
                return this._height;
            } else {
                this._height=val;
                return this;
            }        
        };

		this.data = function(val){
            if(typeof val === 'undefined'){
                return this._data;
            } else {
                this._data=val;
                return this;
            }        
        };

        this.margins = function(val){
            if(typeof val === 'undefined'){
                return this._properties.margin;
            } else {
                this._properties.margin=val;
                return this;
            }        
        };        

		this.nameAttr = function(val){
            if(typeof val === 'undefined'){
                return this._nameAttr;
            } else {
                this._nameAttr=val;
                return this;
            }        
        };       

		this.joinAttr = function(val){
            if(typeof val === 'undefined'){
                return this._joinAttr;
            } else {
                this._joinAttr=val;
                return this;
            }        
        };

		this.valuesList = function(val){
            if(typeof val === 'undefined'){
                return this._valuesList;
            } else {
                this._valuesList=val;
                return this;
            }        
        };

        this.vWhiteSpace = function(val){
            if(typeof val === 'undefined'){
                return this._vWhiteSpace;
            } else {
                this._vWhiteSpace=val;
                return this;
            }        
        };

        this.hWhiteSpace = function(val){
            if(typeof val === 'undefined'){
                return this._hWhiteSpace;
            } else {
                this._hWhiteSpace=val;
                return this;
            }        
        };        

        this.init = function(){
        	this.render(this._id,this._data,this._nameAttr,this._joinAttr,this._valuesList,this._width,this._height);
        }

        this.render = function(){
        	this._render(this._id,this._data,this._nameAttr,this._joinAttr,this._valuesList,this._width,this._height);
        }

        this._render = function(id,data,nameAttr,joinAttr,valuesList,width,height){

        	var _parent = this;

			//this._properties.margin = {top: 120, right: 50, bottom: 20, left: 120};
            this._properties.width = this._width - this._properties.margin.left - this._properties.margin.right;
            this._properties.height = this._height - this._properties.margin.top - this._properties.margin.bottom;

            this._properties.boxWidth = this._properties.width/valuesList.length-this._hWhiteSpace;
            this._properties.boxHeight = this._properties.height/data.length-this._vWhiteSpace;      
            this._properties.x = [];
            valuesList.forEach(function(v,i){
				_parent._properties.x[i] = d3.scale.linear().range([0, _parent._properties.boxWidth]).domain([0, d3.max(data,function(d){return Number(d[v]);})]);             	
            });

            var _grid = d3.select(id)
                .append('svg')
                .attr('class', 'dashgrid')
                .attr('width', width)
                .attr('height', height)
                .append("g")
                .attr("transform", "translate(" + this._properties.margin.left + "," + this._properties.margin.top + ")");

            var tip = d3.tip().attr('class', 'd3-tip').html(function(d,i) {return d3.format('0,000')(d.value); });    

            valuesList.forEach(function(v,i){
            	var g = _grid.append("g").attr('class','bars');
            		
            	data.sort(function(a, b) {
    				return parseFloat(a[v]) - parseFloat(b[v]);
				});

	            data.forEach(function(d,i){
	            	d.pos = i;
	            });

            	data.sort(function(a, b) {
            		return a[_parent._nameAttr].localeCompare(b[_parent._nameAttr]);
				});

                var newData = [];

                data.forEach(function(d,i){
                    var nd = {};
                    nd.pos = d.pos;
                    nd.join = d[_parent._joinAttr];
                    nd.value = d[v];
                    newData.push(nd);
                });

            	g.selectAll("rect")
	                .data(newData)
	                .enter()
	                .append("rect")
	                .attr('class','bars'+i)
	                .attr("x", function(d,i2){return _parent._properties.boxWidth*i+i*_parent._hWhiteSpace})
	                .attr("y", function(d,i2){return _parent._properties.boxHeight*i2+i2*_parent._vWhiteSpace})
	                .attr("width", function(d){
	                    return _parent._properties.x[i](d.value);
	                })
	                .attr("height", _parent._properties.boxHeight)
	                .attr("fill",function(d,i2){
	                	var c = Math.floor(d.pos/data.length*5);
	                	return lg._colors[c];
	                });	                

	            var _xTransform = _parent._properties.boxWidth*i+i*_parent._hWhiteSpace;    

	            var g = _grid.append("g");

	            g.append("text")
		            .text(v)        
	                .attr("x",0)
	                .attr("y",0)               
	                .style("text-anchor", "front")
		            .attr("transform", "translate(" + (_xTransform+ _parent._properties.boxWidth/2-10) + "," + -10 + ") rotate(-65)" )
		            .attr("class","sortLabel")
		            .on("click",function(){
		            	_parent._update(data,valuesList,d3.select(this).text(),nameAttr);
		            });

		        g.append("text")
		            .text(d3.format(".4s")(d3.max(data,function(d){return Number(d[v]);})))        
	                .attr("x",_parent._properties.boxWidth-5)
	                .attr("y",_parent._properties.height+_parent._vWhiteSpace)               
	                .style("text-anchor", "front")
		            .attr("transform", "translate(" + _xTransform + "," + 0 + ")" )
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i});

		        g.append("line")
					.attr("x1", _parent._properties.boxWidth*(i+1)+(i)*_parent._hWhiteSpace)
					.attr("y1", -_parent._hWhiteSpace/2)
					.attr("x2", _parent._properties.boxWidth*(i+1)+(i)*_parent._hWhiteSpace)
					.attr("y2", _parent._properties.height-_parent._vWhiteSpace/2)
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i})
		            .attr("stroke-width", 1)
	                .attr("stroke", "#ddd");

		        g.append("text")
		            .text("0")        
	                .attr("x",-5)
	                .attr("y",_parent._properties.height+_parent._vWhiteSpace)               
	                .style("text-anchor", "front")
		            .attr("transform", "translate(" + _xTransform + "," + 0 + ")" )
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i});	                

		        g.append("line")
					.attr("x1", _parent._properties.boxWidth*(i)+(i)*_parent._hWhiteSpace)
					.attr("y1", -_parent._hWhiteSpace/2)
					.attr("x2", _parent._properties.boxWidth*(i)+(i)*_parent._hWhiteSpace)
					.attr("y2", _parent._properties.height-_parent._vWhiteSpace/2)
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i})
		            .attr("stroke-width", 1)
	                .attr("stroke", "#ddd");                   

				var g = _grid.append("g");

            	var selectBars = g.selectAll("rect")
	                .data(newData)
	                .enter()
	                .append("rect")
	                .attr('class','selectbars'+i)
	                .attr("x", function(d,i2){return _parent._properties.boxWidth*i+i*_parent._hWhiteSpace})
	                .attr("y", function(d,i2){return _parent._properties.boxHeight*i2+i2*_parent._vWhiteSpace})
	                .attr("width", function(d){
	                    return _parent._properties.boxWidth+_parent._hWhiteSpace;
	                })
	                .attr("height", _parent._properties.boxHeight+_parent._vWhiteSpace)
	                .attr("opacity",0)
	                
                d3.selectAll('.selectbars'+i).call(tip);

                selectBars.on("mouseover",function(d,i2){

                        var dataSubset = [];
                        newData.forEach(function(d){
                            dataSubset.push({'key':d.join,'value':d.value});
                        });

                        
                        d3.selectAll('.dashgeom'+d.join).attr("stroke-width",3);                        
                        d3.selectAll('.horLine'+i2).attr("opacity",1);

                        if(lg._selectedBar==-1){
                            d3.selectAll('.maxLabel'+i).attr("opacity",1);
                            lg.mapRegister.colorMap(dataSubset);
                        }

                    })
                    .on("mouseout",function(d,i2){


                        d3.selectAll('.horLine'+i2).attr("opacity",0);
                        d3.selectAll('.dashgeom'+d.join).attr("stroke-width",1);

                        if(lg._selectedBar==-1){
                            d3.selectAll('.maxLabel'+i).attr("opacity",0);
                        }                        
                    })
                    .on('click',function(d,i2){
                        if(lg._selectedBar ==i){
                            lg._selectedBar = -1;
                            console.log('reset');
                        } else {
                            d3.selectAll('.maxLabel'+lg._selectedBar).attr("opacity",0);                          
                            lg._selectedBar = i;
                            d3.selectAll('.maxLabel'+lg._selectedBar).attr("opacity",1);
                            console.log(i);
                        };
                    })

                d3.selectAll('.selectbars'+i).on('mouseover.something', tip.show).on('mouseout.something', tip.hide);         
   	                  	                               
            })
			
			var g = _grid.append("g");
		
			g.selectAll("line")
				.data(data)
	            .enter()
	            .append("line")
				.attr("x1", -_parent._properties.margin.left)
				.attr("y1",function(d,i){return _parent._properties.boxHeight*(i)+(i-0.5)*_parent._vWhiteSpace})
				.attr("x2", _parent._properties.width-_parent._hWhiteSpace)
				.attr("y2", function(d,i){return _parent._properties.boxHeight*(i)+(i-0.5)*_parent._vWhiteSpace})
		        .attr("opacity",0)
		        .attr("class",function(d,i){return "horLine"+i+" horLineTop"})
		        .attr("stroke-width", 1)
	            .attr("stroke", "#ddd");

	        var g = _grid.append("g");
<commit_msg>Update for latest version of leaflet-grid-graph<commit_after>var lg =  {

	mapRegister:'',
	_gridRegister:'',
	_colors:['#edf8fb','#b2e2e2','#66c2a4','#2ca25f','#006d2c'],
    _selectedBar:-1,

	init: function(){
		this.mapRegister.init();
		this._gridRegister.init();
	},

	update: function(){
		console.log('update');
	},

	colors:function(val){
        if(typeof val === 'undefined'){
            return this._colors;
        } else {
            this._colors=val;
            return this;
        }        
    },

	map: function(id){

		this._id = id;
        this._geojson = "";
        this._center = [0,0];
        this._zoom = 1;
        this._joinAttr = "";
        this._map = '';

        lg.mapRegister = this;

        this.geojson = function(val){
            if(typeof val === 'undefined'){
                return this._geojson;
            } else {
                this._geojson=val;
                return this;
            }        
        };

		this.center = function(val){
            if(typeof val === 'undefined'){
                return this._center;
            } else {
                this._center=val;
                return this;
            }        
        };


		this.zoom = function(val){
            if(typeof val === 'undefined'){
                return this._zoom;
            } else {
                this._zoom=val;
                return this;
            }        
        };

        this.joinAttr = function(val){
            if(typeof val === 'undefined'){
                return this._joinAttr;
            } else {
                this._joinAttr=val;
                return this;
            }        
        };

        this._style = function(feature){
            return {
                weight: 1,
                opacity: 0.8,
                color:'#000000',
                fillOpacity: 0,
                className: 'dashgeom dashgeom'+feature.properties[lg.mapRegister._joinAttr]
            };
        };        

        this.init = function(){
        	this._map = this._initMap(this._id,this._geojson,this._center,this._zoom,this._joinAttr);
        }  

        this._initMap = function(id,geojson, center, zoom, joinAttr){

			var baselayer = L.tileLayer('https://data.hdx.rwlabs.org/mapbox-base-tiles/{z}/{x}/{y}.png', {
            	
        	});

            var map = L.map('map', {
                center: center,
                zoom: zoom,
                layers: [baselayer]
            });

            var overlay = L.geoJson(geojson,{
                style: this._style
            }).addTo(map);

            return map;            
        }

        this.colorMap = function (data){
        	var _parent = this;

        	data.sort(function(a, b) {
    			return parseFloat(a.value) - parseFloat(b.value);
			});

        	data.forEach(function(d,i){
        		var c = Math.floor(i/data.length*5);
        		d3.selectAll('.dashgeom'+d.key).attr('fill',lg._colors[c]).attr('fill-opacity',0.8);
        	});
        }
    },

    grid: function(id){

    	this._id = id;
    	this._width = 1000;
    	this._height = 500;
    	this._data = [];
    	this._nameAttr = '';
    	this._joinAttr = '';
    	this._valuesList = [];
    	this._properties = {};
    	this._vWhiteSpace = 1;
    	this._hWhiteSpace = 1;
        this._properties.margin = {top: 120, right: 50, bottom: 20, left: 120};
    	lg._gridRegister = this;

    	this.width = function(val){
            if(typeof val === 'undefined'){
                return this._width;
            } else {
                this._width=val;
                return this;
            }        
        };

		this.height = function(val){
            if(typeof val === 'undefined'){
                return this._height;
            } else {
                this._height=val;
                return this;
            }        
        };

		this.data = function(val){
            if(typeof val === 'undefined'){
                return this._data;
            } else {
                this._data=val;
                return this;
            }        
        };

        this.margins = function(val){
            if(typeof val === 'undefined'){
                return this._properties.margin;
            } else {
                this._properties.margin=val;
                return this;
            }        
        };        

		this.nameAttr = function(val){
            if(typeof val === 'undefined'){
                return this._nameAttr;
            } else {
                this._nameAttr=val;
                return this;
            }        
        };       

		this.joinAttr = function(val){
            if(typeof val === 'undefined'){
                return this._joinAttr;
            } else {
                this._joinAttr=val;
                return this;
            }        
        };

		this.valuesList = function(val){
            if(typeof val === 'undefined'){
                return this._valuesList;
            } else {
                this._valuesList=val;
                return this;
            }        
        };

        this.vWhiteSpace = function(val){
            if(typeof val === 'undefined'){
                return this._vWhiteSpace;
            } else {
                this._vWhiteSpace=val;
                return this;
            }        
        };

        this.hWhiteSpace = function(val){
            if(typeof val === 'undefined'){
                return this._hWhiteSpace;
            } else {
                this._hWhiteSpace=val;
                return this;
            }        
        };        

        this.init = function(){
        	this.render(this._id,this._data,this._nameAttr,this._joinAttr,this._valuesList,this._width,this._height);
        }

        this.render = function(){
        	this._render(this._id,this._data,this._nameAttr,this._joinAttr,this._valuesList,this._width,this._height);
        }

        this._render = function(id,data,nameAttr,joinAttr,valuesList,width,height){

        	var _parent = this;

			//this._properties.margin = {top: 120, right: 50, bottom: 20, left: 120};
            this._properties.width = this._width - this._properties.margin.left - this._properties.margin.right;
            this._properties.height = this._height - this._properties.margin.top - this._properties.margin.bottom;

            this._properties.boxWidth = this._properties.width/valuesList.length-this._hWhiteSpace;
            this._properties.boxHeight = this._properties.height/data.length-this._vWhiteSpace;      
            this._properties.x = [];
            valuesList.forEach(function(v,i){
				_parent._properties.x[i] = d3.scale.linear().range([0, _parent._properties.boxWidth]).domain([0, d3.max(data,function(d){return Number(d[v]);})]);             	
            });

            var _grid = d3.select(id)
                .append('svg')
                .attr('class', 'dashgrid')
                .attr('width', width)
                .attr('height', height)
                .append("g")
                .attr("transform", "translate(" + this._properties.margin.left + "," + this._properties.margin.top + ")");

            var tip = d3.tip().attr('class', 'd3-tip').html(function(d,i) {return d3.format('0,000')(d.value); });
            var tipsort = d3.tip().attr('class', 'd3-tip').html(function(d,i) {return "Click to sort"});     

            valuesList.forEach(function(v,i){
            	var g = _grid.append("g").attr('class','bars');
            		
            	data.sort(function(a, b) {
    				return parseFloat(a[v]) - parseFloat(b[v]);
				});

	            data.forEach(function(d,i){
	            	d.pos = i;
	            });

            	data.sort(function(a, b) {
            		return a[_parent._nameAttr].localeCompare(b[_parent._nameAttr]);
				});

                var newData = [];

                data.forEach(function(d,i){
                    var nd = {};
                    nd.pos = d.pos;
                    nd.join = d[_parent._joinAttr];
                    nd.value = d[v];
                    newData.push(nd);
                });

            	g.selectAll("rect")
	                .data(newData)
	                .enter()
	                .append("rect")
	                .attr('class','bars'+i)
	                .attr("x", function(d,i2){return _parent._properties.boxWidth*i+i*_parent._hWhiteSpace})
	                .attr("y", function(d,i2){return _parent._properties.boxHeight*i2+i2*_parent._vWhiteSpace})
	                .attr("width", function(d){
	                    return _parent._properties.x[i](d.value);
	                })
	                .attr("height", _parent._properties.boxHeight)
	                .attr("fill",function(d,i2){
	                	var c = Math.floor(d.pos/data.length*5);
	                	return lg._colors[c];
	                });	                

	            var _xTransform = _parent._properties.boxWidth*i+i*_parent._hWhiteSpace;    

	            var g = _grid.append("g");

	            g.append("text")
		            .text(v)        
	                .attr("x",0)
	                .attr("y",0)               
	                .style("text-anchor", "front")
		            .attr("transform", "translate(" + (_xTransform+ _parent._properties.boxWidth/2-10) + "," + -10 + ") rotate(-65)" )
		            .attr("class","sortLabel")
		            .on("click",function(){
		            	_parent._update(data,valuesList,d3.select(this).text(),nameAttr);
		            });

                d3.selectAll('.sortLabel').call(tipsort);

		        g.append("text")
		            .text(d3.format(".4s")(d3.max(data,function(d){return Number(d[v]);})))        
	                .attr("x",_parent._properties.boxWidth-5)
	                .attr("y",_parent._properties.height+_parent._vWhiteSpace)               
	                .style("text-anchor", "front")
		            .attr("transform", "translate(" + _xTransform + "," + 0 + ")" )
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i});

		        g.append("line")
					.attr("x1", _parent._properties.boxWidth*(i+1)+(i)*_parent._hWhiteSpace)
					.attr("y1", -_parent._hWhiteSpace/2)
					.attr("x2", _parent._properties.boxWidth*(i+1)+(i)*_parent._hWhiteSpace)
					.attr("y2", _parent._properties.height-_parent._vWhiteSpace/2)
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i})
		            .attr("stroke-width", 1)
	                .attr("stroke", "#ddd");

		        g.append("text")
		            .text("0")        
	                .attr("x",-5)
	                .attr("y",_parent._properties.height+_parent._vWhiteSpace)               
	                .style("text-anchor", "front")
		            .attr("transform", "translate(" + _xTransform + "," + 0 + ")" )
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i});	                

		        g.append("line")
					.attr("x1", _parent._properties.boxWidth*(i)+(i)*_parent._hWhiteSpace)
					.attr("y1", -_parent._hWhiteSpace/2)
					.attr("x2", _parent._properties.boxWidth*(i)+(i)*_parent._hWhiteSpace)
					.attr("y2", _parent._properties.height-_parent._vWhiteSpace/2)
		            .attr("opacity",0)
		            .attr("class",function(d){return "maxLabel"+i})
		            .attr("stroke-width", 1)
	                .attr("stroke", "#ddd");                   

				var g = _grid.append("g");

            	var selectBars = g.selectAll("rect")
	                .data(newData)
	                .enter()
	                .append("rect")
	                .attr('class','selectbars'+i)
	                .attr("x", function(d,i2){return _parent._properties.boxWidth*i+i*_parent._hWhiteSpace})
	                .attr("y", function(d,i2){return _parent._properties.boxHeight*i2+i2*_parent._vWhiteSpace})
	                .attr("width", function(d){
	                    return _parent._properties.boxWidth+_parent._hWhiteSpace;
	                })
	                .attr("height", _parent._properties.boxHeight+_parent._vWhiteSpace)
	                .attr("opacity",0)
	                
                d3.selectAll('.selectbars'+i).call(tip);

                selectBars.on("mouseover",function(d,i2){

                        var dataSubset = [];
                        newData.forEach(function(d){
                            dataSubset.push({'key':d.join,'value':d.value});
                        });

                        
                        d3.selectAll('.dashgeom'+d.join).attr("stroke-width",3);                        
                        d3.selectAll('.horLine'+i2).attr("opacity",1);

                        if(lg._selectedBar==-1){
                            d3.selectAll('.maxLabel'+i).attr("opacity",1);
                            lg.mapRegister.colorMap(dataSubset);
                        }

                    })
                    .on("mouseout",function(d,i2){


                        d3.selectAll('.horLine'+i2).attr("opacity",0);
                        d3.selectAll('.dashgeom'+d.join).attr("stroke-width",1);

                        if(lg._selectedBar==-1){
                            d3.selectAll('.maxLabel'+i).attr("opacity",0);
                        }                        
                    })
                    .on('click',function(d,i2){
                        if(lg._selectedBar ==i){
                            lg._selectedBar = -1;
                        } else {
                            d3.selectAll('.maxLabel'+lg._selectedBar).attr("opacity",0);                          
                            lg._selectedBar = i;
                            d3.selectAll('.maxLabel'+lg._selectedBar).attr("opacity",1);
                        };
                    })

                d3.selectAll('.selectbars'+i).on('mouseover.something', tip.show).on('mouseout.something', tip.hide);
                d3.selectAll('.sortLabel').on('mouseover.something', tipsort.show).on('mouseout.something', tipsort.hide);         
   	                  	                               
            })
			
			var g = _grid.append("g");
		
			g.selectAll("line")
				.data(data)
	            .enter()
	            .append("line")
				.attr("x1", -_parent._properties.margin.left)
				.attr("y1",function(d,i){return _parent._properties.boxHeight*(i)+(i-0.5)*_parent._vWhiteSpace})
				.attr("x2", _parent._properties.width-_parent._hWhiteSpace)
				.attr("y2", function(d,i){return _parent._properties.boxHeight*(i)+(i-0.5)*_parent._vWhiteSpace})
		        .attr("opacity",0)
		        .attr("class",function(d,i){return "horLine"+i+" horLineTop"})
		        .attr("stroke-width", 1)
	            .attr("stroke", "#ddd");

	        var g = _grid.append("g");

{'fraction_non_alphanumeric': 0.1474594741860782, 'fraction_numerical': 0.010965808472960087, 'mean_word_length': 1.3790812606335574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3481231', 'n_tokens_mistral': 9003, 'n_tokens_neox': 8102, 'n_words': 1091}