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

'Report' page on Completed countries #335

Open
tmtmtmtm opened this issue Jun 17, 2016 · 6 comments
Open

'Report' page on Completed countries #335

tmtmtmtm opened this issue Jun 17, 2016 · 6 comments
Assignees
Labels

Comments

@tmtmtmtm
Copy link
Contributor

tmtmtmtm commented Jun 17, 2016

Currently, when we already have gender data for everyone in a country, it's not possible to play any more:

screen shot 2016-06-17 at 13 32 26

Rather than simply showing an 'in place' report on the breakdown for the country (which doesn't always display correctly), we should link through to a page that gives more detail about that.

This page should:

  • Show what the total breakdown is for the country (737 men / 156 women)
  • If we know data from multiple terms, show how that has changed over time
  • When there is more than one political party/group represented, show the gender breakdown for each of those.

NB: This page should be visible without being logged in.

@tmtmtmtm
Copy link
Contributor Author

tmtmtmtm commented Jun 17, 2016

This is a first step towards #329. We will want to very quickly evolve it into a version that applies everywhere, but for now it will only work for countries that are 'complete'.

@tmtmtmtm
Copy link
Contributor Author

tmtmtmtm commented Jun 19, 2016

NB: These stats should be based on the complete data, from EP, rather than any of the data in GB itself: this is a report on what we know about the country, no matter where that data came from.

The first working version of this can probably just calculate the report on request from the information in the database. If that turns out to be too slow, we can roll that up at the same time as we update the database from a webhook. (Or even move that calculation out of band, by building a "gender stats report" similar to how @davewhiteland did the EP-wide names.csv file, and pulling the relevant summary data from that into GB for these pages).

@zarino
Copy link
Member

zarino commented Jun 21, 2016

Note to self: If this involves linking to the report page from the "completed" card in the country list, then we should also fix #322 while we're in the vicinity.

@zarino zarino self-assigned this Jun 21, 2016
@zarino zarino added the 3 - WIP label Jun 21, 2016
@struan
Copy link
Contributor

struan commented Jun 22, 2016

My plan for generating the summary data:

  • create a gender-balance-country-stats (GBCS) heroku app that does the stats generation
  • GBCS will be triggered by everypolitician-data webhooks for merged PRs
  • If the PR contains updated data from GenderBalance (i.e. an updated file in data/$assembly/sources/gender-balance) then process the CSV
  • Use the CSV to update a JSON file that contains summary stats for all assemblies.
  • Commit the JSON file to the gender-balance-country-stats repository in a new branch and create a PR.

For simplicity GB will initially just pull the file in from GitHub and cache it (waves hands).

@tmtmtmtm
Copy link
Contributor Author

tmtmtmtm commented Jun 22, 2016

@struan: the stats should be EveryPolitician stats on Gender — not Gender-Balance stats (i.e it should include stats for countries where we got the data from, say, the official site, and didn't need to get people to play Gender-Balance for them).

Commit the JSON file to the gender-balance-country-stats repository in a new branch and create a PR.

Our normal approach to this is to just commit them directly to the gh-pages branch, rather than triggering a PR.

@tmtmtmtm
Copy link
Contributor Author

This was half-done in #337. Midway down that PR there's a list of things that still need done — we should pull those out into separate tickets.

@tmtmtmtm tmtmtmtm assigned tmtmtmtm and unassigned zarino Jul 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants