<commit_before><div class="container results">
    <div class="row">
        <span>
            <p class="pull-left lead">Societies<span ng-show="results.societies.length">({{ results.societies.length }})</span></p>
        </span>
    </div>
    <tabset>
        <tab heading="Table">
            <div class="row">
                <div ng-hide="results.societies.length">
                    <p class="text-center help-block search-help"></p>
                </div>
                <table class="table" ng-show="results.societies.length">
                    <tr>
                        <th>Name</th>
                        <th>ISO Code</th>
                        <th>Language</th>
                        <th>Trees</th>
                        <th ng-repeat="variable in results.variable_descriptions">{{ variable.name }}</th>
                        <th ng-repeat="environmental in results.environmental_variables">{{ environmental.name }}</th>
                        <th ng-show="results.languages">Language</th>
                        <th ng-show="results.geographic_regions">Geographic Region</th>
                    </tr>
                    <tr ng-repeat="society_result in results.societies">
                        <td><span class="circle" ng-style="society_result.society.style"></span>
                            <a ng-href="/society/{{ society_result.society.id }}" target="_blank">{{ society_result.society.name }}</a>
                        </td>
                        <td>{{ society_result.society.iso_code }}</td>
                        <td>{{ society_result.society.language | formatLanguageName }}</td>
                        <td><a popover="{{society_result.society.trees | formatLanguageTrees }}" title="'Trees'">{{ society_result.society.trees | countOrBlank }}</a></td>
                        <td ng-repeat="variable in results.variable_descriptions">
                            {{ society_result.variable_coded_values | formatVariableCodeValues:variable.id }}
                        </td>
                        <td ng-repeat="environmental in results.environmental_variables">
                            {{ society_result.environmental_values | formatEnvironmentalValues }}
                        </td>
                        <td ng-show="results.languages">
                            {{ society_result.languages | formatLanguage}}
                        </td>
                        <td ng-show="results.geographic_regions">
                            {{ society_result.geographic_regions | formatGeographicRegion}}
                        </td>
                    </tr>
                </table>
            </div>
        </tab>
        <tab heading="Map" select="visible=true" deselect="visible=false">
            <select
                ng-model="results.chosenVariable"
                class="form-control"
                ng-options="variable.name for variable in variables"
                ng-init="results.chosenVariable=variables[0]"
            >
            </select>
           
            <dplace-map societies="results.societies" map-div-id="result-map" visible="visible" query="query" chosen="results.chosenVariable"></dplace-map>
        </tab>
        <tab heading="Download" select="generateDownloadLinks()"><commit_msg>Adding 'Choose a variable' to map tab<commit_after><div class="container results">
    <div class="row">
        <span>
            <p class="pull-left lead">Societies<span ng-show="results.societies.length">({{ results.societies.length }})</span></p>
        </span>
    </div>
    <tabset>
        <tab heading="Table">
            <div class="row">
                <div ng-hide="results.societies.length">
                    <p class="text-center help-block search-help"></p>
                </div>
                <table class="table" ng-show="results.societies.length">
                    <tr>
                        <th>Name</th>
                        <th>ISO Code</th>
                        <th>Language</th>
                        <th>Trees</th>
                        <th ng-repeat="variable in results.variable_descriptions">{{ variable.name }}</th>
                        <th ng-repeat="environmental in results.environmental_variables">{{ environmental.name }}</th>
                        <th ng-show="results.languages">Language</th>
                        <th ng-show="results.geographic_regions">Geographic Region</th>
                    </tr>
                    <tr ng-repeat="society_result in results.societies">
                        <td><span class="circle" ng-style="society_result.society.style"></span>
                            <a ng-href="/society/{{ society_result.society.id }}" target="_blank">{{ society_result.society.name }}</a>
                        </td>
                        <td>{{ society_result.society.iso_code }}</td>
                        <td>{{ society_result.society.language | formatLanguageName }}</td>
                        <td><a popover="{{society_result.society.trees | formatLanguageTrees }}" title="'Trees'">{{ society_result.society.trees | countOrBlank }}</a></td>
                        <td ng-repeat="variable in results.variable_descriptions">
                            {{ society_result.variable_coded_values | formatVariableCodeValues:variable.id }}
                        </td>
                        <td ng-repeat="environmental in results.environmental_variables">
                            {{ society_result.environmental_values | formatEnvironmentalValues }}
                        </td>
                        <td ng-show="results.languages">
                            {{ society_result.languages | formatLanguage}}
                        </td>
                        <td ng-show="results.geographic_regions">
                            {{ society_result.geographic_regions | formatGeographicRegion}}
                        </td>
                    </tr>
                </table>
            </div>
        </tab>
        <tab heading="Map" select="visible=true" deselect="visible=false">
            <h4>Choose a variable:</h4>
            <select
                ng-model="results.chosenVariable"
                class="form-control"
                ng-options="variable.name for variable in variables"
                ng-init="results.chosenVariable=variables[0]"
            >
            </select>
           
            <dplace-map societies="results.societies" map-div-id="result-map" visible="visible" query="query" chosen="results.chosenVariable"></dplace-map>
        </tab>
        <tab heading="Download" select="generateDownloadLinks()">
{'fraction_non_alphanumeric': 0.13176895306859207, 'fraction_numerical': 0.0006016847172081829, 'mean_word_length': 1.556324490580546, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, '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': '7379242', 'n_tokens_mistral': 1714, 'n_tokens_neox': 1631, 'n_words': 274}