<commit_before><commit_msg>add import script for Tendring<commit_after>from data_collection.management.commands import BaseShpStationsShpDistrictsImporter

class Command(BaseShpStationsShpDistrictsImporter):
    srid = 27700
    council_id = 'E07000076'
    districts_name = 'PollingDistricts2016'
    stations_name = 'Polling_Stations_Tendring_2017.shp'
    elections = ['local.essex.2017-05-04']

    def district_record_to_dict(self, record):
        name = str(record[4]).strip()
        code = name[:2]
        return {
            'internal_council_id': code,
            'name': name,
            'polling_station_id': code,
        }

    def station_record_to_dict(self, record):
        return {
            'internal_council_id': str(record[2]).strip(),
            'postcode': '',
            'address': str(record[1]).strip(),
        }

{'fraction_non_alphanumeric': 0.11176470588235295, 'fraction_numerical': 0.03882352941176471, 'mean_word_length': 2.921658986175115, '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': '5398548', 'n_tokens_mistral': 292, 'n_tokens_neox': 266, 'n_words': 43}