<commit_before>var _ = require('lodash');
var utils = require('./utils.js');

console.log(1.0000000000000000, 'USD');

_.each([
	'EURUSD',
	'NZDUSD',
	'GBPUSD',
	'AUDUSD',
	'USDCAD',
	'USDJPY',
	'USDCHF'
], function(currency) {
	utils.download({
		endDate: process.env.REPORT_DATE,
		currency: currency,
		timeScale: '1440',
		periodLength: 1,
		periodUnits: 'week'
	}, function(err, rows) {
		var closePrice = rows[0][3]
		var openPrice = rows[0][3]
		_.each(rows, function(row) {
			openPrice = row[3]
		});

		var invertPercentChange = [
			'USDJPY',
			'USDCHF',
			'USDCAD'
		];
		var percentChange = _.includes(invertPercentChange, currency)
			? (closePrice/openPrice)
			: (openPrice/closePrice);

		console.log(percentChange, currency.replace('USD', ''));
	});
})<commit_msg>fix: `make heatmap`<commit_after>var _ = require('lodash');
var utils = require('./utils.js');

console.log(1.0000000000000000, 'USD');

_.each([
	'EURUSD',
	'NZDUSD',
	'GBPUSD',
	'AUDUSD',
	'USDCAD',
	'USDJPY',
	'USDCHF'
], function(currency) {
	utils.download({
		endDate: process.env.REPORT_DATE,
		currency: currency,
		timeScale: '1440',
		periodLength: 1,
		periodUnits: 'week'
	}, function(err, rows) {
		var closePrice = rows[0][3]
		var openPrice = rows[0][1]
		_.each(rows, function(row) {
			closePrice = row[3]
		});

		var invertPercentChange = [
			'USDJPY',
			'USDCHF',
			'USDCAD'
		];
		var percentChange = _.includes(invertPercentChange, currency)
			? (openPrice/closePrice)
			: (closePrice/openPrice);

		console.log(percentChange, currency.replace('USD', ''));
	});
})
{'fraction_non_alphanumeric': 0.18476190476190477, 'fraction_numerical': 0.03428571428571429, 'mean_word_length': 4.378839590443686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2514544', 'n_tokens_mistral': 719, 'n_tokens_neox': 606, 'n_words': 106}