<commit_before>var d3 = require('d3');
var hogan = require('hogan.js');
var modal = require('modal');
var routeSummarySegments = require('route-summary-segments');
var toCapitalCase = require('to-capital-case');

var optionTemplate = hogan.compile(require('./option.html'));
var routeTemplate = hogan.compile(require('./route.html'));

var filters = {
  caloriesBurned: function(a) {
    return a.calories;
  },
  cost: function(a) {
    return a.cost;
  },
  fastestTime: function(a) {
    return a.time;
  },
  none: function(a) {
    return 0;
  },
  productiveTime: function(a) {
    return a.productiveTime;
  },
  score: function(a) {
    return a.score;
  },
  walkDistance: function(a) {
    return a.walkDistance;
  },
};

/**
 * Expose `Modal`
 */

var Modal = module.exports = modal({
  closable: true,
  width: '768px',
  template: require('./template.html')
}, function(view, routes) {

  view.firstFilter = view.find('#first-filter');
  view.secondFilter = view.find('#second-filter');

  view.firstFilter.value = 'score';
  view.secondFilter.value = 'none';
<commit_msg>Reverse productive time and calories burned<commit_after>var d3 = require('d3');
var hogan = require('hogan.js');
var modal = require('modal');
var routeSummarySegments = require('route-summary-segments');
var toCapitalCase = require('to-capital-case');

var optionTemplate = hogan.compile(require('./option.html'));
var routeTemplate = hogan.compile(require('./route.html'));

var filters = {
  caloriesBurned: function(a) {
    return -a.calories;
  },
  cost: function(a) {
    return a.cost;
  },
  fastestTime: function(a) {
    return a.time;
  },
  none: function(a) {
    return 0;
  },
  productiveTime: function(a) {
    return -a.productiveTime;
  },
  walkDistance: function(a) {
    return a.walkDistance;
  },
};

/**
 * Expose `Modal`
 */

var Modal = module.exports = modal({
  closable: true,
  width: '768px',
  template: require('./template.html')
}, function(view, routes) {

  view.firstFilter = view.find('#first-filter');
  view.secondFilter = view.find('#second-filter');

  view.firstFilter.value = 'cost';
  view.secondFilter.value = 'walkDistance';

{'fraction_non_alphanumeric': 0.16936603424340582, 'fraction_numerical': 0.005552984729291994, 'mean_word_length': 3.9701149425287356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7040211', 'n_tokens_mistral': 730, 'n_tokens_neox': 716, 'n_words': 147}