<commit_before>import React, {Component} from 'react';
import {Table} from 'react-bootstrap';
import {connect} from 'react-redux';
import _ from 'lodash';

class ResultsTable extends Component {

  render() {
    const notVoted = _.difference(this.props.users, this.props.results.map(x => x['userName']));
    const sortedResults = _.orderBy(this.props.results, x => parseInt(x['estimateValue'], 10));
    return (
      <div className="tbl-scroll">
        <Table responsive striped>
          <tbody>
          <tr>
            <th>User</th>
            <th>Vote</th>
          </tr>
          {sortedResults.map(x => _renderVoteRow(x))}
          {notVoted.map((x) => _renderUserRow(x))}<commit_msg>order results table to show outliers first<commit_after>import React, {Component} from 'react';
import {Table} from 'react-bootstrap';
import {connect} from 'react-redux';
import _ from 'lodash';

class ResultsTable extends Component {

  render() {
    const notVoted = _.difference(this.props.users, this.props.results.map(x => x['userName']));

    const voteFreqs = _.countBy(this.props.results, x => x['estimateValue']);
    const countedResults = this.props.results.map(x => ({...x, ...{'count': voteFreqs[parseInt(x['estimateValue'], 10)]}}));
    const sortedResults = _.orderBy(countedResults, ['count', 'userName']);

    return (
      <div className="tbl-scroll">
        <Table responsive striped>
          <tbody>
          <tr>
            <th>User</th>
            <th>Vote</th>
          </tr>
          {sortedResults.map(x => _renderVoteRow(x))}
          {notVoted.map((x) => _renderUserRow(x))}
{'fraction_non_alphanumeric': 0.1631644004944376, 'fraction_numerical': 0.002472187886279357, 'mean_word_length': 3.09873417721519, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 30, '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': '7242272', 'n_tokens_mistral': 519, 'n_tokens_neox': 503, 'n_words': 110}