<commit_before>import { appSizes, appDurations } from '/imports/ui/helpers/settings';
import { mapProjection } from '/imports/ui/helpers/mapProjection';
import _ from 'lodash';

const s = require('underscore.string');
const d3 = require('d3');

const sizes = appSizes();
const dur = appDurations();

export function expandSidebar(state, selectedPlace, selectedPlaceImageId) {
  let $mapSidebar = $('#map-sidebar');

  // Find if there are any then and now images
  let thenNow = _.find(state.thenNow, function (thenNowImage) {
    return thenNowImage.place === selectedPlace.name;
  });
  if (!_.isUndefined(thenNow)) {
    drawThenNowIcon(thenNow, state);
  }

  let selectedPlaceImage = _.find(state.images, function (image) {
    return image.slug == selectedPlaceImageId;
  });

  $('#sidebar-content')
    .removeClass()
    .addClass(selectedPlaceImage.slug);

  // Fade out default heading
  $mapSidebar.find('h3#default-heading')
    .fadeOut(dur.default, function () {<commit_msg>Initial structure for Dakota placename buidling<commit_after>import { appSizes, appDurations } from '/imports/ui/helpers/settings';
import { mapProjection } from '/imports/ui/helpers/mapProjection';
import _ from 'lodash';

const s = require('underscore.string');
const d3 = require('d3');

const sizes = appSizes();
const dur = appDurations();

function drawDakotaPlaceNames(dakota, state) {
  console.log('Dakota place names will be built here');
}

export function expandSidebar(state, selectedPlace, selectedPlaceImageId) {
  let $mapSidebar = $('#map-sidebar');

  // Find if there are any Dakota place names
  const dakota = _.find(state.dakota, function (dakotaPlaceName) {
    console.log(dakotaPlaceName.place);
    console.log('----^ ^ ^ ^ ^ dakotaPlaceName.place ^ ^ ^ ^ ^----');
    return dakotaPlaceName.place === selectedPlace.name;
  });
  if (!_.isUndefined(dakota)) {
    drawDakotaPlaceNames(dakota, state);
  }

  // Find if there are any then and now images
  let thenNow = _.find(state.thenNow, function (thenNowImage) {
    return thenNowImage.place === selectedPlace.name;
  });
  if (!_.isUndefined(thenNow)) {
    drawThenNowIcon(thenNow, state);
  }

  let selectedPlaceImage = _.find(state.images, function (image) {
    return image.slug == selectedPlaceImageId;
  });

  $('#sidebar-content')
    .removeClass()
    .addClass(selectedPlaceImage.slug);

  // Fade out default heading
  $mapSidebar.find('h3#default-heading')
    .fadeOut(dur.default, function () {
{'fraction_non_alphanumeric': 0.14101531023368252, 'fraction_numerical': 0.0024174053182917004, 'mean_word_length': 4.362850971922247, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3840772', 'n_tokens_mistral': 784, 'n_tokens_neox': 784, 'n_words': 180}