Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new boundaries #1802

Closed
ajparsons opened this issue Jun 24, 2024 · 2 comments
Closed

Add new boundaries #1802

ajparsons opened this issue Jun 24, 2024 · 2 comments

Comments

@ajparsons
Copy link
Contributor

New boundaries need to be loaded into TWFY to be referenced.

Assuming we'll do the 'just create new constituencies' approach.

Boundaries are stored under 'posts' and look like this:

{
  "area": {
    "name": "Croydon South"
  },
  "id": "uk.org.publicwhip/cons/159",
  "identifiers": [
    {
      "identifier": "1994",
      "scheme": "historichansard_id"
    }
  ],
  "label": "Member of Parliament for Croydon South",
  "organization_id": "house-of-commons",
  "role": "Member of Parliament",
  "start_date": "1955"
}

Considerations

  1. There are 65 constituencies) with no changes to their boundaries.
  2. There are 418 constituencies that share a name with an old constituency (where it has been lightly changed or forms the core of the new constituency).
  3. We don't currently store GSS codes - GSS codes are part of the Democracy Club output.
  4. There has been an inconsistent approach to updating GSS codes. ONS has created new codes even for constituencies with new changes (e.g. Epping forest was 'E14000693', now 'E14001226',) while constituencies without a change in Scotland have retained the same code(North Ayrshire and Arran remains 'S14000048').

Approaches

Update existing ones

  • Some constituencies have no changed at all (we don't create new posts every election).
  • For the greater set, a sense in that these have not been abolished and many are not seen as new constituencies (not shown anywhere publicly). But just because they have the same name doesn't mean they haven't changed a lot.
  • Allows some connection (in principle) of previous MPs for the constituency (does this matter enough to care?)
  • Inaccuracy of adding new GSS identifiers to 'old' constituencies.

Just create new constituencies

  • It's much easier to just adopt a pattern of starting from scratch each time they change.
  • Close off all constituencies without an end date with an end date of the election.
  • Create 650 new posts/constituencies based on the boundaries with a start date of the election.
  • Add identifiers from lookup sheet (want GSS at least to for democracy club spreadsheet lookup).
  • (Assumption that we'll create new numeric public whip based ids - but the mysoc_full_code in principle would work here).

e.g.

{
  "area": {
    "name": "Croydon South"
  },
  "id": "uk.org.publicwhip/cons/XXX",
  "identifiers": [
    {
      "identifier": "uk.org.mysociety.cons.ukparl.2025.crs",
      "scheme": "mysoc_full_code"
    },
    {
      "identifier": "UKPARL.2025.CRS",
      "scheme": "mysoc_short_code"
    },
    {
      "identifier": "E14001187",
      "scheme": "gss"
    },
    {
      "identifier": "CRS",
      "scheme": "three_code"
    }
  ],
  "label": "Member of Parliament for Croydon South",
  "organization_id": "house-of-commons",
  "role": "Member of Parliament",
  "start_date": "2024-07-04"
}

Questions

  • Assuming we can just do this ahead of time - what in twfy cares about constituency end dates?
  • Does the old end date and the new date need to be a day apart?
@dracos
Copy link
Member

dracos commented Jun 28, 2024

More annoyingly, we appear to have two lists of constituencies, in people.json and constituencies.json - constituencies.json is what is currently loaded into TWFY; the member loading uses the constituencies in people.json to get the constituency name, sigh.

@ajparsons
Copy link
Contributor Author

ajparsons commented Jul 2, 2024

Will be addressed by #1803 and mysociety/parlparse#173

@dracos dracos closed this as completed Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants