<commit_before><!DOCTYPE html>
<html>
<head>
	<title>MetroMerger</title>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Load Leaflet from CDN-->
	<script src="http://cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"></script>
  <link rel="stylesheet" href="http://cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css" />
	<!-- Load town polygons and css from local directory -->
	<script type="text/javascript" src="ct-towns-popchg.js"></script>
  <link rel="stylesheet" href="style.css" />
</head>
<body>
	<div id="map"></div>

<script type="text/javascript">
		var map = L.map('map').setView([41.5, -72.67], 9);
		// customize source link to your GitHub repo
		map.attributionControl
		.setPrefix('View <a href="http://github.com/jackdougherty/otl-metromerger">open-source code on GitHub</a>, created with <a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>');
		new L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
	attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>'
	}).addTo(map);

var geojson;
var totalPop; // unsure if this is the right strategy for setting up this variable

// style the initial map in gray tone
function style(feature) {
    return {
        fillColor: 'gray',
        weight: 2,
        opacity: 1,
        color: 'white',
        dashArray: '3',
        fillOpacity: 0.7
    };
}

// display data when hovering
function highlightFeature(e) {
    var layer = e.target;
    info.update(layer.feature.properties);
}

// when click on town polygon, style color to green
// ALSO my goal is to insert operation that totals the value of each selected layer.feature.properties.Pop2010
// but I clearly don't know how to do this yet
function chooseFeature(e) {
    var layer = e.target;

    layer.setStyle({
        fillColor: 'green',
        fillOpacity: 0.7
     });
    // Insert a better operation to total all layers here or elsewhere
    totalPop = layer.feature.properties.Pop2010;
}

// event listeners for hovering or clicking on town polygons
function onEachFeature(feature, layer) {
    layer.on({
    	mouseover: highlightFeature,
        click: chooseFeature<commit_msg>Total population is now incremented when a town is selected.<commit_after><!DOCTYPE html>
<html>
<head>
	<title>MetroMerger</title>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Load Leaflet from CDN-->
	<script src="http://cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"></script>
  <link rel="stylesheet" href="http://cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css" />
	<!-- Load town polygons and css from local directory -->
	<script type="text/javascript" src="ct-towns-popchg.js"></script>
  <link rel="stylesheet" href="style.css" />
</head>
<body>
	<div id="map"></div>

<script type="text/javascript">
		var map = L.map('map').setView([41.5, -72.67], 9);
		// customize source link to your GitHub repo
		map.attributionControl
		.setPrefix('View <a href="http://github.com/jackdougherty/otl-metromerger">open-source code on GitHub</a>, created with <a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>');
		new L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
	attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>'
	}).addTo(map);

var geojson;
var totalPop = 0; // unsure if this is the right strategy for setting up this variable

// style the initial map in gray tone
function style(feature) {
    return {
        fillColor: 'gray',
        weight: 2,
        opacity: 1,
        color: 'white',
        dashArray: '3',
        fillOpacity: 0.7
    };
}

// display data when hovering
function highlightFeature(e) {
    var layer = e.target;
    info.update(layer.feature.properties);
}

// when click on town polygon, style color to green
// ALSO my goal is to insert operation that totals the value of each selected layer.feature.properties.Pop2010
// but I clearly don't know how to do this yet
function chooseFeature(e) {
    var layer = e.target;

    layer.setStyle({
        fillColor: 'green',
        fillOpacity: 0.7
     });
    // Insert a better operation to total all layers here or elsewhere
    totalPop += layer.feature.properties.Pop2010;
}

// event listeners for hovering or clicking on town polygons
function onEachFeature(feature, layer) {
    layer.on({
    	mouseover: highlightFeature,
        click: chooseFeature
{'fraction_non_alphanumeric': 0.15081058020477817, 'fraction_numerical': 0.01386518771331058, 'mean_word_length': 3.619704433497537, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, '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': '6012283', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1500, 'n_words': 413}