@@ -0,0 +1,1143 @@
+%22%22%22%0AImport Sheffield%0A%22%22%22%0Afrom data_collection.management.commands import BaseShpShpImporter%0A%0Aclass Command(BaseShpShpImporter):%0A    %22%22%22%0A    Imports the Polling Station data from Sheffield%0A    %22%22%22%0A    council_id     = 'E08000019'%0A    districts_name = 'SCCPollingDistricts2015'%0A    stations_name  = 'SCCPollingStations2015.shp'%0A%0A    def district_record_to_dict(self, record):%0A        return %7B%0A            'internal_council_id': record%5B0%5D,%0A            'name': record%5B1%5D,%0A        %7D%0A%0A    def station_record_to_dict(self, record):%0A%0A        address = record%5B1%5D%0A%0A        # remove postcode from end of address if present%0A        postcode_offset = -len(record%5B2%5D)%0A        if address%5Bpostcode_offset:%5D == record%5B2%5D:%0A            address = address%5B:postcode_offset%5D.strip()%0A%0A        # remove trailing comma if present%0A        if address%5B-1:%5D == ',':%0A            address = address%5B:-1%5D%0A%0A        # replace commas with %5Cn%0A        address = %22%5Cn%22.join(map(lambda x: x.strip(), address.split(',')))%0A%0A        return %7B%0A            'internal_council_id': record%5B0%5D,%0A            'postcode'           : record%5B2%5D,%0A            'address'            : address%0A        %7D%0A

add import script for Sheffield