<commit_before>import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createElement, PureComponent } from 'react';
import PropTypes from 'prop-types';
import isEqual from 'lodash/isEqual';

import { COUNTRY } from 'pages/dashboards/router';
import { deburrUpper } from 'utils/data';
import { decodeUrlForState, encodeStateForUrl } from 'utils/stateToUrl';

import shareActions from 'components/modals/share/share-actions';
import { getAdminsSelected, getSentence } from './header-selectors';
import * as ownActions from './header-actions';
import reducers, { initialState } from './header-reducers';
import HeaderComponent from './header-component';

const actions = { ...ownActions, ...shareActions };

const mapStateToProps = ({ countryData, location, header, widgets }) => {
  const {
    isCountriesLoading,
    isRegionsLoading,
    isSubRegionsLoading
  } = countryData;
  const { country } = location.payload;
  const countryDataLoading =
    isCountriesLoading || isRegionsLoading || isSubRegionsLoading;
  const externalLinks =
    countryData.countryLinks && countryData.countryLinks[country];
  const forestAtlasLink =
    externalLinks &&
    externalLinks.find(l =>
      deburrUpper(l.title).indexOf(deburrUpper('forest atlas'))
    );
  const downloadLink = `http://gfw2-data.s3.amazonaws.com/country/umd_country_stats${
    country ? '/iso' : ''
  }/tree_cover_stats_2017${country ? `_${country}` : ''}.xlsx`;
  const locationOptions = { ...countryData };
  const locationNames = getAdminsSelected({ ...countryData, ...location });

  return {
    ...header,
    loading: countryDataLoading || header.loading,
    downloadLink,
    forestAtlasLink,
    externalLinks,
    locationNames,
    locationOptions,
    shareData: {<commit_msg>rolling back the 2016 spreadsheet<commit_after>import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createElement, PureComponent } from 'react';
import PropTypes from 'prop-types';
import isEqual from 'lodash/isEqual';

import { COUNTRY } from 'pages/dashboards/router';
import { deburrUpper } from 'utils/data';
import { decodeUrlForState, encodeStateForUrl } from 'utils/stateToUrl';

import shareActions from 'components/modals/share/share-actions';
import { getAdminsSelected, getSentence } from './header-selectors';
import * as ownActions from './header-actions';
import reducers, { initialState } from './header-reducers';
import HeaderComponent from './header-component';

const actions = { ...ownActions, ...shareActions };

const mapStateToProps = ({ countryData, location, header, widgets }) => {
  const {
    isCountriesLoading,
    isRegionsLoading,
    isSubRegionsLoading
  } = countryData;
  const { country } = location.payload;
  const countryDataLoading =
    isCountriesLoading || isRegionsLoading || isSubRegionsLoading;
  const externalLinks =
    countryData.countryLinks && countryData.countryLinks[country];
  const forestAtlasLink =
    externalLinks &&
    externalLinks.find(l =>
      deburrUpper(l.title).indexOf(deburrUpper('forest atlas'))
    );
  const downloadLink = `http://gfw2-data.s3.amazonaws.com/country/umd_country_stats${
    country ? '/iso' : ''
  }/tree_cover_stats_2016${country ? `_${country}` : ''}.xlsx`;
  const locationOptions = { ...countryData };
  const locationNames = getAdminsSelected({ ...countryData, ...location });

  return {
    ...header,
    loading: countryDataLoading || header.loading,
    downloadLink,
    forestAtlasLink,
    externalLinks,
    locationNames,
    locationOptions,
    shareData: {
{'fraction_non_alphanumeric': 0.12562534741523068, 'fraction_numerical': 0.0044469149527515284, 'mean_word_length': 4.41203007518797, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1880747', 'n_tokens_mistral': 1060, 'n_tokens_neox': 1040, 'n_words': 238}