-
Notifications
You must be signed in to change notification settings - Fork 15
Updating ONSPD
Every ~3 months we need to update ONSPD. Polling Bot will raise an issue to tell us about the new release.
We need to download this and save it on s3 in s3://pollingstations.public.data/ons/onspd/
To do this first upload it:
aws s3 cp ONSPD_FEB_2021_UK.zip s3://pollingstations.public.data/ons/onspd/
Then make sure it's readable:
aws s3api put-object-acl --bucket pollingstations.public.data --key ons/onspd/ONSPD_FEB_2021_UK.zip --acl public-read
Then we can run python manage.py import_onspd --url https://s3.eu-west-2.amazonaws.com/pollingstations.public.data/ons/onspd/ONSPD_AUG_2024.zip
(for example) to import it. Downloading and unzipping that file requires more memory than a t2.micro
has, so run it from a beefier instance.
You'll need to log into to an EC2 instance to run it. You can do this with:
aws ec2-instance-connect ssh --os-user every_election --instance-id i-0123456789