<commit_before>import React from 'react'
import { formatTime, formatPercentage } from '../../utils'
import './styles.css'

const KPI = ({ voteSummary, speechSummary, documentSummary }) => {
  const { standsTaken, away } = voteSummary.votePercentages
  let timeInStand = 0
  if (speechSummary && speechSummary.Samtals) {
    timeInStand = speechSummary.Samtals.minutes
  }
  let attendance = 100 - parseFloat(away)

  let bills = 0
  let motions = 0
  if (documentSummary && documentSummary.summary) {
    bills = documentSummary.summary.bills.total
    motions = documentSummary.summary.motions.total
  }


  return (
    <div className="KPI">
      <div className="KPI-stats">
        <div className="KPI-statsItem">
          <p className="KPI-statsText">
            {formatPercentage(attendance)}
          </p>
          <h1 className="KPI-statsHeading">Mæting*</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">
            {formatPercentage(standsTaken)}
          </p>
          <h1 className="KPI-statsHeading">Afstaða*</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">{formatTime(timeInStand)}</p>
          <h1 className="KPI-statsHeading">í Ræðustól</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">{bills}</p>
          <h1 className="KPI-statsHeading">Frumvörp</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">{motions}</p>
          <h1 className="KPI-statsHeading">Þingsályktunartillögur</h1>
        </div>
      </div>
      <p className="KPI-smallprint">* í atkvæðagreiðslum</p>
    </div>
  )
}

export default KPI<commit_msg>Change * label for KPI<commit_after>import React from 'react'
import { formatTime, formatPercentage } from '../../utils'
import './styles.css'

const KPI = ({ voteSummary, speechSummary, documentSummary }) => {
  const { standsTaken, away } = voteSummary.votePercentages
  let timeInStand = 0
  if (speechSummary && speechSummary.Samtals) {
    timeInStand = speechSummary.Samtals.minutes
  }
  let attendance = 100 - parseFloat(away)

  let bills = 0
  let motions = 0
  if (documentSummary && documentSummary.summary) {
    bills = documentSummary.summary.bills.total
    motions = documentSummary.summary.motions.total
  }


  return (
    <div className="KPI">
      <div className="KPI-stats">
        <div className="KPI-statsItem">
          <p className="KPI-statsText">
            {formatPercentage(attendance)}
          </p>
          <h1 className="KPI-statsHeading">Mæting*</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">
            {formatPercentage(standsTaken)}
          </p>
          <h1 className="KPI-statsHeading">Afstaða*</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">{formatTime(timeInStand)}</p>
          <h1 className="KPI-statsHeading">í Ræðustól</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">{bills}</p>
          <h1 className="KPI-statsHeading">Frumvörp</h1>
        </div>
        <div className="KPI-statsItem">
          <p className="KPI-statsText">{motions}</p>
          <h1 className="KPI-statsHeading">Þingsályktunartillögur</h1>
        </div>
      </div>
      <p className="KPI-smallprint">* atkvæðagreiðslur</p>
    </div>
  )
}

export default KPI
{'fraction_non_alphanumeric': 0.14383757506434086, 'fraction_numerical': 0.009150700600514728, 'mean_word_length': 2.705508474576271, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 77, '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': '5662071', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1150, 'n_words': 199}