<commit_before>import React from 'react'
import { connect } from 'react-redux'

import { } from '../actions'

import PointChart from './point-chart'
import MainFigure from './main-figure'

const Sidebar = React.createClass({
  propTypes: {
    selected: React.PropTypes.string,
    dispatch: React.PropTypes.func
  },
  render: function () {
    const selected = this.props.selected
    if (selected.length) {
      return (
        <section className='sidebar'>
          <MainFigure />
        </section>
      )
    }
    return (
      <section className='sidebar'>
        <PointChart />
      </section>
    )
  }
})

function mapStateToProps (state) {
  return {
    selected: state.selected
  }
}

export default connect(mapStateToProps)(Sidebar)
<commit_msg>Attaches map data to main figure<commit_after>import React from 'react'
import { connect } from 'react-redux'

import { } from '../actions'

import PointChart from './point-chart'
import MainFigure from './main-figure'

const SideBar = React.createClass({
  propTypes: {
    selected: React.PropTypes.string,
    mapData: React.PropTypes.object,
    dispatch: React.PropTypes.func
  },
  render: function () {
    const selected = this.props.selected
    if (selected.length) {
      return (
        <section className='sidebar'>
          <MainFigure
            selected={this.props.selected}
            mapData={this.props.mapData}
          />
        </section>
      )
    }
    return (
      <section className='sidebar'>
        <PointChart />
      </section>
    )
  }
})

function mapStateToProps (state) {
  return {
    selected: state.selected
  }
}

export default connect(mapStateToProps)(SideBar)

{'fraction_non_alphanumeric': 0.12114014251781473, 'fraction_numerical': 0.0, 'mean_word_length': 2.6004273504273505, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '512932', 'n_tokens_mistral': 493, 'n_tokens_neox': 492, 'n_words': 115}