<commit_before>from data_collection.management.commands import BaseHalaroseCsvImporter

class Command(BaseHalaroseCsvImporter):
    council_id      = 'W06000011'
    addresses_name  = 'May 2017/Swansea_polling_station_export-2017-03-06.csv'
    stations_name   = 'May 2017/Swansea_polling_station_export-2017-03-06.csv'
    elections       = [
        'local.swansea.2017-05-04',
        'parl.2017-06-08'
    ]
    csv_encoding    = 'latin-1'

    def station_record_to_dict(self, record):

        """
        Joe received correction from Swansea council:

        St. Illtyd's Church
        Ystrad Road
        Fforestfach
        Swansea
        SA5 5AU

        The postcode should be SA5 4BT.
        """
        if record.pollingstationnumber == '72':
            record = record._replace(pollingstationpostcode = 'SA5 4BT')

        return super().station_record_to_dict(record)<commit_msg>Update import script for Swansea (closes #997)<commit_after>from data_collection.management.commands import BaseHalaroseCsvImporter

class Command(BaseHalaroseCsvImporter):
    council_id      = 'W06000011'
    addresses_name  = 'parl.2017-06-08/Version 1/polling_station_export-2017-06-02.csv'
    stations_name   = 'parl.2017-06-08/Version 1/polling_station_export-2017-06-02.csv'
    elections       = ['parl.2017-06-08']
    csv_encoding    = 'latin-1'

{'fraction_non_alphanumeric': 0.0943952802359882, 'fraction_numerical': 0.08185840707964602, 'mean_word_length': 2.910662824207493, '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': '1893025', 'n_tokens_mistral': 529, 'n_tokens_neox': 452, 'n_words': 75}