Skip to content

Commit

Permalink
Import script for Bolsover (2024-05-02) (closes #6315)
Browse files Browse the repository at this point in the history
  • Loading branch information
polling-bot-4000 committed Feb 27, 2024
1 parent 6a58ca1 commit 8d9052f
Showing 1 changed file with 3 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,10 @@
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "BOS"
addresses_name = (
"2023-05-04/2023-04-11T13:09:30.661328/Democracy_Club__04May2023.tsv"
"2024-05-02/2024-02-27T09:50:16.683811/Democracy_Club__02May2024.tsv"
)
stations_name = (
"2023-05-04/2023-04-11T13:09:30.661328/Democracy_Club__04May2023.tsv"
"2024-05-02/2024-02-27T09:50:16.683811/Democracy_Club__02May2024.tsv"
)
elections = ["2023-05-04"]
elections = ["2024-05-02"]
csv_delimiter = "\t"

def address_record_to_dict(self, record):
uprn = record.property_urn.strip().lstrip("0")

if uprn in [
"200004520294", # THE HERMITAGE, WALLS LANE, BARLBOROUGH, CHESTERFIELD
"10013072329", # 1 BOWDEN COURT, CLOWNE
"100030071192", # SOUTHFIELD LODGE, BAKESTONE MOOR, WHITWELL, WORKSOP
"200004511872", # 31 OXCROFT LANE, OXCROFT, CHESTERFIELD
"10034144937", # NEWTON WOOD FARM, NEWTON, ALFRETON
"100032019011", # SCHOOL HOUSE, CHURCH HILL, BLACKWELL, ALFRETON
"10013073817", # 31B CHURCH STREET, SOUTH NORMANTON
"200002768236", # GRANGE FARM, BIRCHWOOD LANE, SOUTH NORMANTON, ALFRETON
"200004511974", # 32 OXCROFT LANE, OXCROFT, CHESTERFIELD
"200004511975", # 33 OXCROFT LANE, OXCROFT, CHESTERFIELD
"200004520437", # DAMSBROOK FARM COTTAGE, OXCROFT ESTATE, MANSFIELD ROAD, OXCROFT, WORKSOP
]:
return None

return super().address_record_to_dict(record)

def station_record_to_dict(self, record):
# Mobile Unit, Whaley Common Adjacent Henton Memorial Hall, Whaley Common, Langwith, Mansfield
if record.polling_place_id == "4879":
record = record._replace(polling_place_postcode="NG20 9HU")

# Whaley Thorns and Langwith Village Hall, Portland Road, Langwith, Mansfield, NG20 9EZ
if record.polling_place_id == "4907":
record = record._replace(
polling_place_easting="453287",
polling_place_northing="371077",
)

# Bolsover Parish Rooms, Hornscroft Road, Bolsover, Chesterfield, S44 6HG
if record.polling_place_id == "4876":
record = record._replace(
polling_place_easting="447491",
polling_place_northing="370263",
)

return super().station_record_to_dict(record)

0 comments on commit 8d9052f

Please sign in to comment.