<commit_before>
var map = null;
function initialize() {
	var mapOptions = {
			center : new google.maps.LatLng(50, 0),
			zoom : 4,
			mapTypeId : google.maps.MapTypeId.ROADMAP
	};
	map = new google.maps.Map(document.getElementById("map"),
			mapOptions);
}


function addHeatmapLayer () {
	/* Data points defined as a mixture of WeightedLocation and LatLng objects */
	// Get bounds of the current map
	var bounds = map.getBounds();
	var ne = bounds.getNorthEast(); // LatLng of the north-east corner
	var sw = bounds.getSouthWest(); // LatLng of the south-west corder
	
	var nw = new google.maps.LatLng(ne.lat(), sw.lng());
	var se = new google.maps.LatLng(sw.lat(), ne.lng());
	
	console.log ("lonLeft:" + sw.lng());
	console.log ("lonRight:" + ne.lng());
	console.log ("latTop:" + ne.lat());
	console.log ("latBot:" + sw.lat());
	
	
	$.post('/bound', { lonLeft:sw.lng(), lonRight:ne.lng(), latTop:ne.lat(), latBot:sw.lat()} , function(data) {
		console.log('=====store=data===========');
		console.log(data);
		console.log('==end=store=data========');
		data = data.substring(1,data.length-1)
		var n=data.split(", ");
		console.log(n.length);
		console.log(n);
		
		var heatMapData = [];
		
		for (var i = 0; i < n.length; i++) {
			var latLon = n[i].substring(1,n[i].length-1)
			var lat = latLon.split(":")[0];
			var lon = latLon.split(":")[1];
			var latLong = new google.maps.LatLng(parseFloat(lat), parseFloat(lon));
			heatMapData.push(latLong);
		}
		console.log(heatMapData);
		var heatmap = new google.maps.visualization.HeatmapLayer({
			data: heatMapData
		});
		heatmap.setMap(map);
		
	});
	
}

function testHeatMap() {
	/* Data points defined as an array of LatLng objects */
	var heatmapData = [
	  new google.maps.LatLng(37.782, -122.447),
	  new google.maps.LatLng(37.782, -122.445),
	  new google.maps.LatLng(37.782, -122.443),
	  new google.maps.LatLng(37.782, -122.441),
	  new google.maps.LatLng(37.782, -122.439),
	  new google.maps.LatLng(37.782, -122.437),
	  new google.maps.LatLng(37.782, -122.435),
	  new google.maps.LatLng(37.785, -122.447),
	  new google.maps.LatLng(37.785, -122.445),
	  new google.maps.LatLng(37.785, -122.443),
	  new google.maps.LatLng(37.785, -122.441),
	  new google.maps.LatLng(37.785, -122.439),
	  new google.maps.LatLng(37.785, -122.437),
	  new google.maps.LatLng(37.785, -122.435)
	];


	var heatmap = new google.maps.visualization.HeatmapLayer({
	  data: heatmapData
	});
	heatmap.setMap(map);
}

var start_place = null;<commit_msg>removed testHeatmap function<commit_after>
var map = null;
function initialize() {
	var mapOptions = {
			center : new google.maps.LatLng(50, 0),
			zoom : 4,
			mapTypeId : google.maps.MapTypeId.ROADMAP
	};
	map = new google.maps.Map(document.getElementById("map"),
			mapOptions);
}


function addHeatmapLayer () {
	/* Data points defined as a mixture of WeightedLocation and LatLng objects */
	// Get bounds of the current map
	var bounds = map.getBounds();
	var ne = bounds.getNorthEast(); // LatLng of the north-east corner
	var sw = bounds.getSouthWest(); // LatLng of the south-west corder
	
	var nw = new google.maps.LatLng(ne.lat(), sw.lng());
	var se = new google.maps.LatLng(sw.lat(), ne.lng());
	
	console.log ("lonLeft:" + sw.lng());
	console.log ("lonRight:" + ne.lng());
	console.log ("latTop:" + ne.lat());
	console.log ("latBot:" + sw.lat());
	
	
	$.post('/bound', { lonLeft:sw.lng(), lonRight:ne.lng(), latTop:ne.lat(), latBot:sw.lat()} , function(data) {
		console.log('=====store=data===========');
		console.log(data);
		console.log('==end=store=data========');
		data = data.substring(1,data.length-1)
		var n=data.split(", ");
		console.log(n.length);
		console.log(n);
		
		var heatMapData = [];
		
		for (var i = 0; i < n.length; i++) {
			var latLon = n[i].substring(1,n[i].length-1)
			var lat = latLon.split(":")[0];
			var lon = latLon.split(":")[1];
			var latLong = new google.maps.LatLng(parseFloat(lat), parseFloat(lon));
			heatMapData.push(latLong);
		}
		console.log(heatMapData);
		var heatmap = new google.maps.visualization.HeatmapLayer({
			data: heatMapData
		});
		heatmap.setMap(map);
		
	});
}


var start_place = null;
{'fraction_non_alphanumeric': 0.19202114876231674, 'fraction_numerical': 0.04229752463350156, 'mean_word_length': 3.7349260523321957, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, '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': '2315577', 'n_tokens_mistral': 1798, 'n_tokens_neox': 1551, 'n_words': 323}