-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import script for Hounslow (2024-05-02) (closes #6202)
- Loading branch information
1 parent
adfdf39
commit 42a037b
Showing
1 changed file
with
5 additions
and
23 deletions.
There are no files selected for viewing
28 changes: 5 additions & 23 deletions
28
polling_stations/apps/data_importers/management/commands/import_hounslow.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,9 @@ | ||
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter | ||
from data_importers.management.commands import Unknown | ||
|
||
|
||
class Command(BaseXpressDemocracyClubCsvImporter): | ||
class Command(Unknown): | ||
council_id = "HNS" | ||
addresses_name = ( | ||
"2022-05-05/2022-02-21T16:49:40.581288/Democracy_Club__05May2022.CSV" | ||
) | ||
stations_name = ( | ||
"2022-05-05/2022-02-21T16:49:40.581288/Democracy_Club__05May2022.CSV" | ||
) | ||
elections = ["2022-05-05"] | ||
addresses_name = "2024-05-02/2024-02-19T13:51:15.012540/Democracy Club Upload.csv" | ||
stations_name = "2024-05-02/2024-02-19T13:51:15.012540/Democracy Club Upload.csv" | ||
elections = ["2024-05-02"] | ||
csv_encoding = "windows-1252" | ||
|
||
def address_record_to_dict(self, record): | ||
if record.addressline6 in [ | ||
"TW8 0QS", | ||
"W4 1TF", | ||
"W4 4EU", | ||
"TW4 6DH", | ||
"TW13 6AB", | ||
"TW3 3DW", | ||
"TW4 5HS", | ||
]: | ||
return None | ||
|
||
return super().address_record_to_dict(record) |