<commit_before>/*global define*/
define('app/toolbox-engagement-ratio', ['lodash', 'TelemetryPromises', 'DevToolsMetrics', 'FIREFOX_RELEASES'],
function(_, T, DevToolsMetrics, FIREFOX_RELEASES) {

  var ID = 'devtools-toolbox-engagement-ratio-chart';
  var chart = {
    title: 'Engagement Ratio',
    description: '',
    width: 335,
    height: 320,
    left: 60,
    legend: T.ALL_CHANNELS,
    colors: _.values(FIREFOX_RELEASES.colors),
    legend_target: '#' + ID + '-legend'
  };

  DevToolsMetrics.line(ID, chart);

  return function(dau, mau) {
    var data = _.map(dau, (d, i) => {
      // console.log('mau', mau[i]);
      return _.map(d, (day) => {
        // console.log('chan', day, j);
        // find the mau that matches the date given
        var month = _.find(mau[i], {'date': day.date});
        // remove the object so we don't iterate over it again
        _.remove(mau[i], {'date': day.date});
        // double check we have the same channel
        if (day.channel === month.channel) {
          day.value = (day.value / month.value);
        }<commit_msg>update the description for engagement ratio<commit_after>/*global define*/
define('app/toolbox-engagement-ratio', ['lodash', 'TelemetryPromises', 'DevToolsMetrics', 'FIREFOX_RELEASES'],
function(_, T, DevToolsMetrics, FIREFOX_RELEASES) {

  var ID = 'devtools-toolbox-engagement-ratio-chart';
  var chart = {
    title: 'Engagement Ratio (DAU/MAU)',
    description: 'The ratio of daily user activity to monthly users',
    width: 335,
    height: 320,
    left: 60,
    legend: T.ALL_CHANNELS,
    colors: _.values(FIREFOX_RELEASES.colors),
    legend_target: '#' + ID + '-legend'
  };

  DevToolsMetrics.line(ID, chart);

  return function(dau, mau) {
    var data = _.map(dau, (d, i) => {
      // console.log('mau', mau[i]);
      return _.map(d, (day) => {
        // console.log('chan', day, j);
        // find the mau that matches the date given
        var month = _.find(mau[i], {'date': day.date});
        // remove the object so we don't iterate over it again
        _.remove(mau[i], {'date': day.date});
        // double check we have the same channel
        if (day.channel === month.channel) {
          day.value = (day.value / month.value);
        }
{'fraction_non_alphanumeric': 0.1584553928095872, 'fraction_numerical': 0.007101642254771416, 'mean_word_length': 2.8074324324324325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6419087', 'n_tokens_mistral': 774, 'n_tokens_neox': 746, 'n_words': 195}