mysociety / caps

A simple, open database of local government climate action plan documents and emissions data.
https://cape.mysociety.org
Other
8 stars 2 forks source link

[Scorecards] Incorrect “out of X councils” figure on Council pages #671

Closed zarino closed 3 months ago

zarino commented 3 months ago

The homepage table contains 164 district councils, but on any given district council’s individual page, it’s reported that there are 186:

Screenshot 2024-06-05 at 15 22 27

Likewise, the homepage table shows 21 county councils, but an individual county council’s page reports 24:

Screenshot 2024-06-05 at 15 24 58

I’m fairly sure these numbers were correct at launch time, so has something changed since?

The count on individual council pages comes from this council_count variable, on line 395 of views.py:

        council_count = Council.objects.filter(
            authority_type__in=group["types"],
            country__in=group["countries"],
        ).count()

Should it be limiting to just councils that existed at the time of the scoring?