<commit_before>var locationsURL = "http://localhost:3000/locations.json"

$(document).ready(function(){
	
	$.getJSON(locationsURL).done(function (chapter) { 
		console.log(chapter);
		_.each(chapter, function (plot) {
			console.log(plot);

			$(".us_map").mapael({
				map : {
					name : "usa_states",
					cssClass : "map",
					tooltip : {
						cssClass : "mapTooltip" //class name of the tooltip container
						},
					defaultArea : {
						attrs : {
							fill : "#282828",
							stroke: "#9a9a9a",
						},
						attrsHover : {
							fill : "#d8ae64"
						}
					},
					defaultPlot : {
						type : "circle",
						href : "#",
						attrs: {
							fill : "#f95a61"
						}
					},
					eventHandlers: {
						click : function (){
							this.href="locations/<%= slug %>"  
						}
					}
				},
				plots: {},	
			});
		});
		var newPlots = {
			"<%= location %>" : {
			latitude: "<%= latitude %>",
			longitude: "<%= longitude %>",
			//href: "locations/<% slug %>",
			//tooltip: {content : "<% location %>"}
			}
		};
		$(".us_map").trigger("update", newPlots);
	});
});
<commit_msg>re-nest FOR GREAT JUSTICE<commit_after>var locationsURL = "http://localhost:3000/locations.json";

$(document).ready(function(){
	var plots = []

	$.getJSON(locationsURL).done(function (chapters) {
		// 	console.log(chapters);
			// _.each(chapter, function (plot) {
			// 	console.log(plot);
			// });
		_.each(chapters, function (plot) {
			newobj = {
				value: plot.location,
				latitude: plot.latitude,
				longitude: plot.longitude
			}
			plots.push(newobj);
		})
		console.log("yey!");
	}).done(function () {
		$(".us_map").mapael({

		map : {
			name : "usa_states",
			cssClass : "map",
			tooltip : {
				cssClass : "mapTooltip" //class name of the tooltip container
				},
			defaultArea : {
				attrs : {
					fill : "#282828",
					stroke: "#9a9a9a",
				},
				attrsHover : {
					fill : "#d8ae64"
				}
			},
			defaultPlot : {
				type : "circle",
				href : "#",
				attrs: {
					fill : "#f95a61"
				}
			},
			eventHandlers: {
				click : function (){
					this.href="locations/<%#= @locations.location %>" // needs to be something else
				}
			}
		},

		plots : plots
		})
	})
});
{'fraction_non_alphanumeric': 0.1912964641885766, 'fraction_numerical': 0.01813236627379873, 'mean_word_length': 2.2455882352941177, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '3207557', 'n_tokens_mistral': 1089, 'n_tokens_neox': 771, 'n_words': 135}