<commit_before>// import Awesomplete from 'awesomplete'
import _ from 'lodash'

import pakage from './../../package.json'
import { select } from './utils/dom.js'
// import search from './search.js'

// import {
// 	getAllStorageResults,
// 	getStorageResultsByToken,
// 	setStorageResults,
// } from './storage.js'

// const mapzenKey = '<KEY>'

// let WAITING_FOR_TANGRAM = false

const startMap = (url) => {

	// Select DOM map container.
	const mapElement = select('.observed-snowfall__map')

	// Create Mapzen map in map container.
	const map = L.Mapzen.map(mapElement, {
		center: [42.2040, -71.8674],
		zoom: 7,
		scene: 'assets/scene.yaml?q=' + pakage.version,
		minZoom: 2,
		maxZoom: 10,
	})

	// Set attribution.
	map.attributionControl.addAttribution('Snowfall analysis <a href="https://www.nohrsc.noaa.gov/snowfall/">NOHRSC</a>')

	// Add locator button.
	const locator = L.Mapzen.locator()
	locator.addTo(map)

	// Keep track of map location in URL hash.
	L.Mapzen.hash({ map })

	let scene

	// Listen to the Tangram layer being loaded on the map.
	map.on('tangramloaded', e => {

		// Save scene to variable.
		scene = e.tangramLayer.scene

		// Force cache busting
		// TODO: update this with the real url once it's ready
		scene.setDataSource('_snowtotals', {<commit_msg>Fix attribution<commit_after>// import Awesomplete from 'awesomplete'
import _ from 'lodash'

import pakage from './../../package.json'
import { select } from './utils/dom.js'
// import search from './search.js'

// import {
// 	getAllStorageResults,
// 	getStorageResultsByToken,
// 	setStorageResults,
// } from './storage.js'

// const mapzenKey = '<KEY>'

// let WAITING_FOR_TANGRAM = false

const startMap = (url) => {

	// Select DOM map container.
	const mapElement = select('.observed-snowfall__map')

	// Create Mapzen map in map container.
	const map = L.Mapzen.map(mapElement, {
		center: [42.2040, -71.8674],
		zoom: 7,
		scene: 'assets/scene.yaml?q=' + pakage.version,
		minZoom: 2,
		maxZoom: 10,
	})

	// Set attribution.
	map.attributionControl.addAttribution('Snowfall analysis <a href="http://www.weather.gov/erh/hydromet">NWS ERH</a>')

	// Add locator button.
	const locator = L.Mapzen.locator()
	locator.addTo(map)

	// Keep track of map location in URL hash.
	L.Mapzen.hash({ map })

	let scene

	// Listen to the Tangram layer being loaded on the map.
	map.on('tangramloaded', e => {

		// Save scene to variable.
		scene = e.tangramLayer.scene

		// Force cache busting
		// TODO: update this with the real url once it's ready
		scene.setDataSource('_snowtotals', {
{'fraction_non_alphanumeric': 0.14707023670935196, 'fraction_numerical': 0.01241753977493209, 'mean_word_length': 3.2823920265780733, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 1, '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': '1721281', 'n_tokens_mistral': 974, 'n_tokens_neox': 896, 'n_words': 242}