DemocracyClub / EveryElection

:ballot_box_with_check: For recording every election in the UK
https://elections.democracyclub.org.uk/
BSD 3-Clause "New" or "Revised" License
11 stars 14 forks source link

Special cases for City of London Elections #87

Open chris48s opened 7 years ago

chris48s commented 7 years ago

Slightly edited comments from conversation on slack:

@sjorford wrote:

According to http://democracy.cityoflondon.gov.uk/mgMemberIndex.aspx?bcr=1 "Each ward elects one Alderman and two or more Common Councilmen (collectively referred to as Members, equivalent to councillors), dependent on its population. There are currently 100 Common Councilmen and 25 Aldermen serving as elected representatives..."

@chris48s wrote:

If I create local.city-of-london.tower.by.2017-09-12, is that sufficiently unambiguous? I assume that even if there were both and Alderperson and Common Councilperson being elected for the same ward at the same time you'd essentially get have one poll with 2 ballots? ..but then I think the idea with the election ids spec is that each ballot should have a distinct id..

@sjorford wrote:

for the SP/NAW/GLA we have an intermediate level of IDs e.g. gla.c and gla.a so do we need something like local.city-of-london.cc.tower.by.2017-09-12 and local.city-of-london.alder.tower.by.2017-09-12?

I think we technically we should introduce sub-types to account for City of London oddities.

The other thing this raises is versioning the spec. For the moment it probably doesn't matter as it is only really us dogfooding the schema but once we have wider users, I think it becomes useful to be able to say that local.city-of-london.tower.by.2017-09-12 was created under version 1.0 but would be local.city-of-london.alder.tower.by.2017-09-12 under version 1.1 or something. Probably worth thinking about.. Even once we're accounting for all of the edge cases present in the current structure/legislation correctly there is still the possibility of electoral reform, changes to local government structure + so on..

GeoWill commented 2 years ago

Just as a note of what I've done for the 2022 elections. I've created a new organisation for the aldermanic elections city-of-london-alder' with an official identifier that is 'LDN-alder'. I then created a new divisionset and copied all the divisions over, setting theseats_total` to 1.

from copy import deepcopy

# Make a new org
city_of_london = Organisation.objects.get(id=54)

city_of_london_alder = deepcopy(city_of_london)

city_of_london_alder.id = None
city_of_london_alder.official_identifier = 'LND-alder'
city_of_london_alder.slug = "city-of-london-alder"
city_of_london_alder.election_name = "City of London aldermanic election"
city_of_london_alder.save()

# Make a new divset
city_of_london_divisionset = OrganisationDivisionSet.objects.get(id=105)
city_of_london_alder_divisionset = deepcopy(city_of_london_divisionset)

city_of_london_alder_divisionset.id = None
city_of_london_alder_divisionset.organisation = city_of_london_alder
city_of_london_alder_divisionset.save()

# copy the divisions
for div in city_of_london_divisionset.divisions.all():
    div.id = None
    div.divisionset = city_of_london_alder_divisionset
    div.seats_total = 1
    div.save()

# copy the geographies
geographies = [
    (div.official_identifier, div.geography)
    for div in city_of_london_divisionset.divisions.all()
]
for gss, geog in geographies:
    div = OrganisationDivision.objects.get(
        official_identifier=gss, divisionset=city_of_london_alder_divisionset
    )
    geog.id = None
    geog.division_id = div.id
    geog.save()
    # attach it to the target division
    div.geography = geog
    div.save()
pmk01 commented 2 years ago

Aldermanic (not by-elections. Alderman seats can't have by-elections) local.city-of-london.tower.by.2017-09-12/ local.city-of-london.langbourn.by.2017-09-12/ local.city-of-london.portsoken.by.2017-12-14/ local.city-of-london.candlewick.by.2018-07-05/ local.city-of-london.cheap.by.2018-07-05/ local.city-of-london.aldgate.by.2018-07-12/ local.city-of-london.bridge.by.2018-07-12/ local.city-of-london.bread-street.by.2018-08-30/ local.city-of-london.broad-street.by.2018-12-13 local.city-of-london.billingsgate.by.2019-01-31/ local.city-of-london.bassishaw.by.2019-04-30/ local.city-of-london.coleman-street.by.2019-12-19/ local.city-of-london.dowgate.by.2019-12-19/ local.city-of-london.farringdon-within.by.2019-12-19/ local.city-of-london.vintry.by.2019-08-07/ local.city-of-london.lime-street.by.2019-08-07/

Common Councillor by-elections local.city-of-london.bishopsgate.by.2017-11-14/ local.city-of-london.bishopsgate.by.2018-03-20/ local.city-of-london.billingsgate.by.2018-03-22/ local.city-of-london.castle-baynard.by.2018-10-09/ local.city-of-london.cordwainer.by.2019-04-30/ local.city-of-london.farringdon-within.by.2019-07-24/ local.city-of-london.coleman-street.by.2019-07-30/ local.city-of-london.aldersgate.by.2019-11-13/

~I don't know what happened here but I think these were supposed to be Aldermen~ ~local.city-of-london.lime-street.by.2019-08-07/~ ~local.city-of-london.vintry.by.2019-08-07/~

pmk01 commented 2 years ago

Also, this has happened on the old elections. At least it's friendly.

Next election

chris48s commented 2 years ago

local.city-of-london.lime-street.by.2019-08-07 and local.city-of-london.vintry.by.2019-08-07

were both Alderman elections but they got cancelled because they were unconstested

pmk01 commented 2 years ago

~As in, no-one turned up at all? I see Vintry, which I must have missed, but Lime Street doesn't appear to be in the list of Aldermanic elections.~

Oh wait, yes it is it's just misdated 2017 I think!