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

Poll and budget demographic stats change over time #5531

Open
javierm opened this issue May 11, 2024 · 0 comments
Open

Poll and budget demographic stats change over time #5531

javierm opened this issue May 11, 2024 · 0 comments

Comments

@javierm
Copy link
Member

javierm commented May 11, 2024

References

  • Demographic stats were introduced in commit 132397b for budgets and in commit be68c8c for polls; this bug has always been present in these statistics

Current Behavior

A few years after a poll/budget has finished, the displayed stats might change. It happens because the stats reflect people's current age, gender and geozone, instead of their data at the time they voted.

Expected Behavior

Demographic stats should refer to the time when the process took place.

Notes

For poll voters, we actually store their demographic information at the time they voted in the poll_voters table, so maybe tweaking the participants method could be enough 🤔.

For budget investments, however, we don't currently store this information. We could calculate the age based on when the process took place, but there's no way to track whether someone has changed their gender or their geozone since then.

Pull request #5533 improves the calculation of age stats (not as precise as using the information in poll_voters would be, in the case of polls, though), which solves the most important problem in this issue; after all, not everybody changes their gender or their geozone, but most people certainly change their age as time goes by.

@javierm javierm changed the title Poll/budget demographic stats change over time Poll and budget demographic stats change over time May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant