-
Notifications
You must be signed in to change notification settings - Fork 2
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 showing gender stats for a country #337
Conversation
As an MVP I guess this is OK, but I'm hoping we can create something a bit more exciting! Some thoughts:
|
Thanks for the super feedback @tmtmtmtm.
Nope, not deliberate. That should probably be on this page too. It's quite reassuring to also show it on the /countries page, if only because it makes the list a lot more colourful and engaging, and gives you the feeling that the site is active.
Nothing, just hide the button.
I was being a bit fanciful. Would you rather show all groups? Even if some of the groups only have 1 or 2 members?
Like this… Rather than this…? |
@tmtmtmtm – I also wondered about maybe nesting the two types of chart. So, maybe a "Show party breakdown" link next to each term, that, when clicked, unfolds the party charts for that term. Do you think that maybe makes more sense? (All looking a bit busy in that screenshot – it would need some time tweaking the hierarchy, so the distinction between the two levels of chart was clear.) I'm assuming we have the party data over time, and that we want to show it, of course. |
Oh gosh, this also raises the possibility of nesting the data the other way, so you could list by group first, and then by how that group looked in each term. Useful for answering questions like "Is the Conservative Party more equal than it was in the 80s?" |
Hard to say. Quite a few countries have a significant number of groups (30+ within a single term at times), but if you cut at that, say, only showing those with 5 or more members, I suspect most countries become a lot more manageable. Not sure it's necessary to roll the others up, though, especially if we're displaying a total anyway.
Yep: that looks better to me. Feel free to try to persuade me it shouldn't though, if you prefer the other one :)
Have it, yes (in most cases anyway). What exactly we want to show from it is the key question! I don't want to over-complicate things here (from a user's POV, that is. Extra complexity behind the scenes to make what we display be simpler is perfectly fine), and people can always go spelunking in the data themselves if they really want to know something deeper, but I think it's important to show something more than just a top-level breakdown for the legislature, as a key thing we're demonstrating is that we have the per-person data available to slice and dice however someone wants, not just the rolled-up version that you can get from IPU et al. |
Feels like we've outgrown the single column layout for this page. Here's my latest thinking, after a few attempts to get it into a logical order: Summary of each legislature near the top of the page, where clicking on a legislature name or the "Full report" link will scroll you down the page to that's legislature's section. Term and group names are given lots of horizontal space, because I know they can be very long. "Display by…" links next to each one open up a little indented column of progress bars: Example of a country with very patchy data (just one legislature, no historical data): Can't shake the feeling that, when we're missing data (eg: no historical data) it's an opportunity to tell the user why, and give them a subtle reminder that the data's all crowdsourced and if they know a source for new data, they can tell us, via everypolitician.org. |
The "page" classes should come in useful for other static pages that we want a nice chunky header and centred content on, like About and the Home page.
@tmtmtmtm I've just pushed an updated version of the report page, with some realistic looking data, a new layout, and the "click to unfold" functionality I was talking about. Thoughts? https://gender-balance-pr-337.herokuapp.com/reports/Australia |
@zarino I suspect there'll be a few things that might need tweaked once we see it with real data, but in general, yep, this approach works OK for me. I think flushing the male and female bars against the two sides definitely works better, and I'm wondering if similarly shifting the text (e.g. "461 men" flushed left, and "351 women" flushed right) would also not just look better but avoid the awkward truncation problems? We'll also probably need some good intro text for the page, bearing in mind that it's entirely plausible that people could land on one of these pages as their first intro to the site. If we really wanted we could presumably get fancy with that, and show different text based on whether the person is logged in / has played before / etc, but perhaps there's just a very simple one sentence intro at the top that explains what we're showing here, in between the country name and the play/download links? @MyfanwyNixon @davewhiteland |
Yep, I was already thinking that. It's a super simple way to fix #320, without messing about with flexbox. |
Talking of getting fancy, could you show the number of players the data has been created by? I think that's something I'd want to know: it's like an indicator of how reliable it is.
If, as you say, this might be the first time people have seen Gender Balance at all, I'd also then want to add a 'find out more' linking to the About page. I also had to work out that the top part of the data referred to the current legislature, not all time. Worth adding something like "How things stand in [country] right now"? (Also, woah, I would have expected a lot more gender: 'other' in the Galactic Senate). |
@MyfanwyNixon these aren't the "Gender-Balance.org" numbers — they include all the information we have, no matter where we got it from. If we already have gender information from, say, an official site, we don't even offer that country to be played on Gender Balance. |
Oh! Well then a simple line would be:
Maybe with a [See where this data come from] link that could go to the about page with an addition to explain where the data comes from. |
Currently experimenting with the idea of reusing the existing "card" component from elsewhere on the site, to clearly differentiate the legislature summaries from the more detailed charts further down. Might also help provide some continuity for people coming to this page from the /countries page. Sharing just in case that affects the copy requirements. |
@chrismytton – I think this is ready for you to wire up with real data. |
@zarino: There are some sizing issues if the legislature names are a bit on the long side: |
@struan – Good point. Since the whole card is clickable, I'm wondering whether we even need the "Show details" hints. Try just removing the |
When there was only one item the div.row wasn't getting closed correctly, which was breaking the page layout. This change uses Enumerable#each_slice rather than the array index to correctly close tags.
This takes up a lot of room and probably isn't needed since the whole card is clickable anyway.
I've removed the However I haven't made any changes to the styles as they're currently still being used on the list of countries ("42 politicians to play" text on country cards). |
I assumed the download button would link to the download page on EP.org,
which _is_ at the country level.
|
320 would be on the required last for me, not just desired. The data is
illegible without it in a huge number of places.
|
This was my understanding also. |
Download link now pointing at @davewhiteland's lovely download page on everypolitician.org. @zarino is going to do #320 tomorrow (Thursday) AM and then we can put this live ready for @mhl's presentation in the afternoon. Once live we can continue with further tweaks, but I'm keen to get this live rather than have it turn into a long running pull request! |
This seems to be fundamentally broken at the minute, in that all the links from the This is broken in several different ways at the minute, so there'll be separate fixes needed for them. The first is to only link through to these pages once it is not possible for a user to play the country in question any more. The second is to make those pages actually make sense once someone does get to them (including by URL munging). NB It's entirely possible that one individual might have played somewhere like Grenada, but not enough other people for there to be any data to report yet, so the page needs to cope with that, or there being almost no data reported. I don't believe the current version does well enough in either of those scenarios. (Botswana is an example of somewhere with very little data): I also don't believe this can credibly go live whilst we still have pages like If we can't fix that by having Group UUIDs, then https://github.com/everypolitician/gender-balance-country-stats will need to be adjusted to roll up the stats based on the Wikidata ID, where appropriate, in the meantime. (The comment about Arabic party names was that @JenMysoc was going to build the party ID → wikidata ID mapping files for the countries where we only have group names in Arabic, thus enabling us to roll-up correctly for those legislatures) I would also say that not offering people links that don't work (i.e. the "Play this country" link, when you can't) should be a fairly strong no-no (and doesn't seem like it should be too difficult to prevent, surely?) And, per the discussion in earlier comments above, I think we still need at least a very basic one sentence intro for the benefit of people arriving directly to a page like this (Actual "call to action" sharing buttons etc can certainly be added later, but we have to assume that some people will actively share them anyway, or arrive directly by other means, so there needs to be something to explain what's going on / link to the introductory material). [This is doubly so if the link to this page is simply the now rather obscure "No politicians left to play" text on the prior page, though fixing that to be something more obvious would certainly be preferable…] I'm open to persuasion that some of the above might be solvable in less-than-ideal ways before going live, but they all seem much closer to 'must have' than 'nice to have' to me. In terms of ones that shouldn't necessarily be blocks to going live, but should really be fixed up as quickly as possible thereafter (though I suspect some of these can be done fairly trivially in passing when fixing some of the other things): In the above list, "Fix layout when a country only has one legislature" is marked as done, but still looks odd to me: I'm not sure whether the fix isn't deployed yet, or whether there was something different fixed, but I would have expected this to be centred, or something. (NB it's an order of magnitude more common for us to only have a single legislature for a country, rather than two) And I would add the parallel version of 'Hide "Display by term" button if there's only one term of information' — i.e. 'Hide "Display by group" button if there's only one group' (see, for example, Alderney for all of those issues) The ordering of Groups also seems quite odd at the minute. I would have expected that to be by size (i.e. groups with the most members first) [in both lists]: This is going to be particularly important for somewhere like Israel, with 150 different Groups represented (though as per the discussion above, I strongly suspect that the best solution there is to only include Groups over a certain threshold, rather than all groups ever). [I also think we need to explicitly remove 'Unknown'] The repetition of the legislature name in the summary card also seems a little redundant: Is there something more useful we could say there? |
@zarino If there are only men, or only women, the bar looks a little odd, as it's only rounded at one end: We could get rid of many cases of this by simply not showing Groups with under a certain number of members, but there are always going to be a few cases with a complete imbalance: Is is easy to round both ends in those cases? NB It also conceivably happens for the reporting on the entire legislature too: [It's a little odd that that breakdown doesn't include 'Unknown', but even if that's a mistake, I suspect there will be countries/houses with 100% men] |
@chrismytton that's definitely the preferred route, but I suspect the best way to do that is to cherry-pick out the parts that don't break anything, rather than merging something that needs to be progressively unbroken in follow-up PRs. The easiest way to get there right now seems to be to revert the parts that actually link to the report pages, so that they can be merged without being technically 'live', and then only put those links back once we're happy with the pages being linked to. (We could explicitly bounce people off those pages if they get there by URL munging, but that might be a bit too far. I'd be tempted to temporarily keep them inside the login wall and even add a banner to them saying "Under construction — not for publication — these stats may not be correct" etc in the meantime, just in case anyone does start linking to them, though). |
For now we want to keep the report page hidden while we're still working on it.
We want to keep these semi-private while we're still working on them.
This page isn't finished yet so we don't want people to be sharing it externally.
OK, I've removed the links to the report page, hidden it behind the login and added a warning banner to the page: I'm going to merge and deploy this now so that we can continue with other enhancements in other pull requests. @mhl For your presentation you can access the report pages by signing in and changing the url to something like |
get '/reports/:country' do | ||
redirect to('/login') unless current_user | ||
@country = Everypolitician.country(slug: params[:country]) | ||
stats_raw = JSON.parse(open('https://everypolitician.github.io/gender-balance-country-stats/stats.json').read, symbolize_names: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to do something a little more defensive in case this fails for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Ticketed here #340
To-do
See how it looks so far: https://gender-balance-pr-337.herokuapp.com/reports/Australia