<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import RegionsProvider from 'providers/regions-provider';
import ChartStackedArea from 'components/charts/stacked-area';
import Dropdown from 'components/dropdown';
import ButtonGroup from 'components/button-group';
import Tag from 'components/tag';

import styles from './ghg-emissions-styles.scss';

class GhgEmissions extends PureComponent {
  // eslint-disable-line react/prefer-stateless-function
  render() {
    const {
      data,
      config,
      sources,
      sourceSelected,
      handleSourceChange,
      breaksBy,
      breakSelected,
      handleBreakByChange,
      filters,
      filterSelected,
      handleFilterChange
    } = this.props;
    return (
      <div>
        <RegionsProvider />
        <ChartStackedArea config={config} data={data} />
        <Tag
          data={{
            color: 'red',
            name: 'United States'
          }}
          onRemove={() => {
            console.info('please remove me');
          }}
        />
        <div className={styles.col4}>
          <Dropdown
            label="Category"
            options={sources}
            onChange={handleSourceChange}
            value={sourceSelected}
            clearable={false}
          />
          <Dropdown
            label="BreakBy"
            options={breaksBy}
            onChange={handleBreakByChange}
            value={breakSelected}
            clearable={false}
          />
          <Dropdown
            label={breakSelected.label}
            options={filters}
            onChange={handleFilterChange}
            value={filterSelected}
            clearable={false}
          />
          <ButtonGroup className={styles.colEnd} />
        </div>
      </div>
    );
  }
}<commit_msg>Render tags from columns<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import RegionsProvider from 'providers/regions-provider';
import ChartStackedArea from 'components/charts/stacked-area';
import Dropdown from 'components/dropdown';
import ButtonGroup from 'components/button-group';
import Tag from 'components/tag';

import styles from './ghg-emissions-styles.scss';

class GhgEmissions extends PureComponent {
  // eslint-disable-line react/prefer-stateless-function
  render() {
    const {
      data,
      config,
      sources,
      sourceSelected,
      handleSourceChange,
      breaksBy,
      breakSelected,
      handleBreakByChange,
      filters,
      filterSelected,
      handleFilterChange
    } = this.props;
    return (
      <div>
        <RegionsProvider />
        <ChartStackedArea config={config} data={data} />
        {config.columns.y &&
          config.columns.y.map(column => (
            <Tag
              key={column.value}
              data={{
                color: 'red',
                name: column.label
              }}
              onRemove={() => {
                console.info('please remove me');
              }}
            />
          ))}
        <div className={styles.col4}>
          <Dropdown
            label="Category"
            options={sources}
            onChange={handleSourceChange}
            value={sourceSelected}
            clearable={false}
          />
          <Dropdown
            label="BreakBy"
            options={breaksBy}
            onChange={handleBreakByChange}
            value={breakSelected}
            clearable={false}
          />
          <Dropdown
            label={breakSelected.label}
            options={filters}
            onChange={handleFilterChange}
            value={filterSelected}
            clearable={false}
          />
          <ButtonGroup className={styles.colEnd} />
        </div>
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.10670170827858082, 'fraction_numerical': 0.0005256241787122207, 'mean_word_length': 1.8171724648408587, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 28, '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': '2498479', 'n_tokens_mistral': 977, 'n_tokens_neox': 975, 'n_words': 193}