<commit_before>
// MAP
var map = L.map('map')
	.setView([38.209985, -84.559826], 14);

var north = 38.4927902222;
var south = 38.1131782532;
var east = -84.4018173218;
var west = -84.7400054932;
var southWest = L.latLng(south, west);
var northEast = L.latLng(north, east);
var bounds = L.latLngBounds(southWest, northEast);

mapboxGeocoderKey = '<KEY>';

var geocoderOptions = {
	position: 'topleft',
	placeholder: "Search an address...",
	geocoder: L.Control.Geocoder.mapbox(mapboxGeocoderKey)
}

var geocoder = new L.Control.geocoder(geocoderOptions).addTo(map);

// BASEMAPS
var darkBase = L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
	attribution: 'Stamen'
});
var lightBase = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
	attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
	subdomains: 'abcd',
	maxZoom: 19
});
var aerial = L.tileLayer('http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
	subdomains: 'abcd',
	id: 'gscplanning.ob337ddj',
	accessToken: '<KEY>',
});
var aerialGray = new L.tileLayer.grayscale('http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
	subdomains: 'abcd',
	id: 'gscplanning.ob337ddj',
	accessToken: '<KEY>',
	quotaDividerTune: 9
});

var iconLayersControl = new L.Control.IconLayers(
		[
			{
				title: 'Dark Base',
				layer: darkBase,
				icon: './img/dark-matter-thumb.gif'
			},
			{
				title: 'Light Base',
				layer: lightBase,
				icon: './img/positron-thumb.gif'
			},
			{
				title: 'Aerial',
				layer: aerial,
				icon: './img/aerial-thumb.gif'
			},
			{
				title: 'Aerial (Gray)',
				layer: aerialGray,
				icon: './img/aerial-gray-thumb.gif'
			}
		],
		{
			position: 'bottomleft',
			maxLayersInRow: 2
		}
	);
iconLayersControl.addTo(map)

iconLayersControl.on('activelayerchange', function(e) {
    console.log('layer switched', e.layer);
});

// FEATURE LAYERS
var zones;
var priority;
var hills;
var bridges;
var curves;
var emergencyServices;
var schools;

// ZONES LAYER
zones = new L.TileLayer('http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
	subdomains: 'abcd',
	id: 'gscplanning.plowZones',
	accessToken: '<KEY>',
	maxNativeZoom: 17,
	maxZoom: 18,
	zIndex: 99
});

// Incase we decide to go back to drawing this as a feature layer

// function zonesColor(d){
// 	return d == 1 ? '#E74C3C':
// 		d == 2 ? '#2ECC71':
// 		d == 3 ? '#3498DB':
// 		d == 4 ? '#9B59B6':
// 		"fff";
// }

// function zonesStyle(feature){
// 	return {
// 		fillColor: zonesColor(feature.properties.LABEL),
// 		fillOpacity: 0.25,
// 		weight: 0
// 	}
// }

// var zonesGeoJSON = L.geoJson(null, {
// 	style: zonesStyle
// });

// zones = new omnivore.topojson("../data/gtownPlowZones_simple.topojson", null, zonesGeoJSON);

// HILLS LAYER
function hillsStyle(feature) {
	return {
		weight: 3,
		color: "#fff",
		opacity: 1,
		dashArray: "4, 4",
		lineCap: "butt"
	}
}

hills = new L.GeoJSON.AJAX("../data/hills.geojson", {
	style: hillsStyle
});

// PRIORITY LAYERS
function priorityColor(d) {
	return d == 1 ? '#2196F3':
		d == 2 ? '#F44336':
		d == 3 ? '#4CAF50':
		d == 4 ? '#FFEE58':
		d == 5 ? '#9E9E9E':
		"fff";
}

function priorityOpacity(d) {
	return d <= 3 ? 1:
		0.5;
}

function priorityStyle(feature) {
	var legend = feature.properties.legend
	return {
		weight: 1.75,
		color: priorityColor(legend),
		opacity: priorityOpacity(legend),
		lineCap: "butt",
		lineJoin: "round"
	}
}

var priorityGeoJSON = L.geoJson(null, {
	style: priorityStyle
});

priority = new omnivore.topojson("data/Street_SnowPriority_GTOWN_20151119_WGS84.topojson", null, priorityGeoJSON)
	.addTo(map);

// BRIDGES LAYER
bridges = new L.GeoJSON.AJAX("../data/bridges.geojson", {
	pointToLayer: function(feature, latlng) {
		var bridgesIcon = L.icon({
			iconUrl: 'img/bridges-marker.svg',
			iconSize: [12,12],
		})
		var bridgesMarker = L.marker(latlng, {
			icon: bridgesIcon
		})
		return bridgesMarker;
	}
});

// CURVES LAYER
curves = new L.GeoJSON.AJAX("data/curves.geojson", {
	pointToLayer: function(feature, latlng) {
		var curvesIcon = L.icon({
			iconUrl: 'img/curves-marker.svg',
			iconSize: [14,14],
		})
		var curvesMarker = L.marker(latlng, {
			icon: curvesIcon
		})
		return curvesMarker;
	}
});<commit_msg>unbork some more relative paths<commit_after>
// MAP
var map = L.map('map')
	.setView([38.209985, -84.559826], 14);

var north = 38.4927902222;
var south = 38.1131782532;
var east = -84.4018173218;
var west = -84.7400054932;
var southWest = L.latLng(south, west);
var northEast = L.latLng(north, east);
var bounds = L.latLngBounds(southWest, northEast);

mapboxGeocoderKey = '<KEY>';

var geocoderOptions = {
	position: 'topleft',
	placeholder: "Search an address...",
	geocoder: L.Control.Geocoder.mapbox(mapboxGeocoderKey)
}

var geocoder = new L.Control.geocoder(geocoderOptions).addTo(map);

// BASEMAPS
var darkBase = L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
	attribution: 'Stamen'
});
var lightBase = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
	attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
	subdomains: 'abcd',
	maxZoom: 19
});
var aerial = L.tileLayer('http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
	subdomains: 'abcd',
	id: 'gscplanning.ob337ddj',
	accessToken: '<KEY>',
});
var aerialGray = new L.tileLayer.grayscale('http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
	subdomains: 'abcd',
	id: 'gscplanning.ob337ddj',
	accessToken: '<KEY>',
	quotaDividerTune: 9
});

var iconLayersControl = new L.Control.IconLayers(
		[
			{
				title: 'Dark Base',
				layer: darkBase,
				icon: './img/dark-matter-thumb.gif'
			},
			{
				title: 'Light Base',
				layer: lightBase,
				icon: './img/positron-thumb.gif'
			},
			{
				title: 'Aerial',
				layer: aerial,
				icon: './img/aerial-thumb.gif'
			},
			{
				title: 'Aerial (Gray)',
				layer: aerialGray,
				icon: './img/aerial-gray-thumb.gif'
			}
		],
		{
			position: 'bottomleft',
			maxLayersInRow: 2
		}
	);
iconLayersControl.addTo(map)

iconLayersControl.on('activelayerchange', function(e) {
    console.log('layer switched', e.layer);
});

// FEATURE LAYERS
var zones;
var priority;
var hills;
var bridges;
var curves;
var emergencyServices;
var schools;

// ZONES LAYER
zones = new L.TileLayer('http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
	attribution: 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
	subdomains: 'abcd',
	id: 'gscplanning.plowZones',
	accessToken: '<KEY>',
	maxNativeZoom: 17,
	maxZoom: 18,
	zIndex: 99
});

// Incase we decide to go back to drawing this as a feature layer

// function zonesColor(d){
// 	return d == 1 ? '#E74C3C':
// 		d == 2 ? '#2ECC71':
// 		d == 3 ? '#3498DB':
// 		d == 4 ? '#9B59B6':
// 		"fff";
// }

// function zonesStyle(feature){
// 	return {
// 		fillColor: zonesColor(feature.properties.LABEL),
// 		fillOpacity: 0.25,
// 		weight: 0
// 	}
// }

// var zonesGeoJSON = L.geoJson(null, {
// 	style: zonesStyle
// });

// zones = new omnivore.topojson("../data/gtownPlowZones_simple.topojson", null, zonesGeoJSON);

// HILLS LAYER
function hillsStyle(feature) {
	return {
		weight: 3,
		color: "#fff",
		opacity: 1,
		dashArray: "4, 4",
		lineCap: "butt"
	}
}

hills = new L.GeoJSON.AJAX("data/hills.geojson", {
	style: hillsStyle
});

// PRIORITY LAYERS
function priorityColor(d) {
	return d == 1 ? '#2196F3':
		d == 2 ? '#F44336':
		d == 3 ? '#4CAF50':
		d == 4 ? '#FFEE58':
		d == 5 ? '#9E9E9E':
		"fff";
}

function priorityOpacity(d) {
	return d <= 3 ? 1:
		0.5;
}

function priorityStyle(feature) {
	var legend = feature.properties.legend
	return {
		weight: 1.75,
		color: priorityColor(legend),
		opacity: priorityOpacity(legend),
		lineCap: "butt",
		lineJoin: "round"
	}
}

var priorityGeoJSON = L.geoJson(null, {
	style: priorityStyle
});

priority = new omnivore.topojson("data/Street_SnowPriority_GTOWN_20151119_WGS84.topojson", null, priorityGeoJSON)
	.addTo(map);

// BRIDGES LAYER
bridges = new L.GeoJSON.AJAX("data/bridges.geojson", {
	pointToLayer: function(feature, latlng) {
		var bridgesIcon = L.icon({
			iconUrl: 'img/bridges-marker.svg',
			iconSize: [12,12],
		})
		var bridgesMarker = L.marker(latlng, {
			icon: bridgesIcon
		})
		return bridgesMarker;
	}
});

// CURVES LAYER
curves = new L.GeoJSON.AJAX("data/curves.geojson", {
	pointToLayer: function(feature, latlng) {
		var curvesIcon = L.icon({
			iconUrl: 'img/curves-marker.svg',
			iconSize: [14,14],
		})
		var curvesMarker = L.marker(latlng, {
			icon: curvesIcon
		})
		return curvesMarker;
	}
});
{'fraction_non_alphanumeric': 0.18880551612249036, 'fraction_numerical': 0.032244980734131005, 'mean_word_length': 3.9045251118846345, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, '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': '5639556', 'n_tokens_mistral': 4443, 'n_tokens_neox': 3934, 'n_words': 732}