-
Notifications
You must be signed in to change notification settings - Fork 19
Welsh Community Reviews
#TODO: Intro
Some of these will appear in slack from our legislation.gov.uk scraper, but, unfortunately, not all of them. Our current understanding is if a community review was conducted out by the council rather than the DBCC, then legislation.gov.uk will not publish them. We could potentially scrape https://www.dbcc.gov.wales/reviews, but this may or may not be worth the effort.
With LGBCE Community Reviews, we can't process them until after their effective date, because there is no easy way to get the new boundaries, until they're published in BoundaryLine. However, for DBCC Community Reviews, we've found that if we ask nicely, they'll send us shapefiles with the new electoral ward boundaries. This arrangement may not last, but, for now, if we can get a shapefile, then we can process a completed DBCC Community Review as outlined in the following section.
Do the following locally, recording the final commands for use on production:
- Check the shapefile in QGIS. We're getting these from the DBCC directly and so far they've had some minor issues. Some things to look out for:
-
invalid geometry: Use the
check validityalgorithm in the toolbox and, if necessary,fix geometries. - too many wards: Make sure that the file only contains electoral wards and doesn't have community wards. Some files have had a field name like "community" but the feature names and boundaries are for the electoral wards.
- boundaries haven't changed: Make sure that the wards in the file actually have the 'consquential changes' applied. One way to check is by comparing the the previous boundaries. Another is to look for changes from the maps in the legislation.
-
invalid geometry: Use the
- Set end date on the previous division set.
- Manually create a new division set in admin for the Community Review:
- Copy the divisions from the previous division set to the new one using
python manage.py copy_divisions <old_id> <new_id> --no-geographies - Upload the shapefile to the correct s3 bucket, e.g.
"s3://ee.boundary-reviews.production/swansea/The County of Swansea (Communities) Order 2026/" - Use
import_lgbceto try and import the boundaries, creating and uploading aname_map.json, if necessary, e.g.python manage.py import_lgbce -s 'pembrokeshire/The County of Pembrokeshire (Communities) Order 2026/PEMBRO_1_fixed.zip' PEM - Check that the boundaries look good by generating the pmtiles file using
update_pmtiles --divset-ids <new_id>.
If it looks good locally, the shapefile and optional name_map is uploaded to s3, and you've got the commands ready to go, then create repeat steps 2-7 (skip 5) on production.