<commit_before>import React from 'react';
import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines';
import _ from 'lodash';

function avarage(data) {
  return _.round(_.sum(data)/data.length)
}

export default (props) => {
  return (
    <div>
      <Sparklines data={props.data} limit={5} width={180} height={120}>
        <SparklinesLine color={props.color} />
        <SparklinesReferenceLine type="avg" />
      </Sparklines>
      <div>Avarage: {avarage(props.data)} {props.unit}</div>
    </div>
  );
}<commit_msg>Update chart.js<commit_after>import React from 'react';
import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines';
import _ from 'lodash';

function avarage(data) {
  return _.round(_.sum(data)/data.length)
}

export default (props) => {
  return (
    <div>
      <Sparklines data={props.data} limit={5} width={180} height={120}>
        <SparklinesLine color={props.color} />
        <SparklinesReferenceLine type="avg" />
      </Sparklines>
      <div>Average: {avarage(props.data)} {props.unit}</div>
    </div>
  );
}
{'fraction_non_alphanumeric': 0.16061705989110708, 'fraction_numerical': 0.012704174228675136, 'mean_word_length': 3.902222222222222, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, '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': '2324368', 'n_tokens_mistral': 385, 'n_tokens_neox': 364, 'n_words': 73}