everypolitician / gender-balance

Crowdsourcing platform for gathering gender information about politicians to improve the data in EveryPolitician
gender-balance.org
15 stars 3 forks source link

Leader Board #123

Closed tmtmtmtm closed 9 years ago

chrismytton commented 9 years ago
chrismytton commented 9 years ago

For the first iteration we can just use something like:

SELECT count(*) as count, name
  FROM responses
  INNER JOIN users on responses.user_id = users.id
  GROUP BY name
  ORDER BY count desc
  LIMIT 10;
chrismytton commented 9 years ago

Or using Sequel (this project's ORM):

Response.join(:users, id: :user_id)
  .group_and_count(:name)
  .order(Sequel.desc(:count))
  .limit(10)
tmtmtmtm commented 9 years ago

We should experiment with different options, but perhaps a basic score of 1 point per card; a level completion bonus of an extra point per card in that level; a country bonus of another extra point for every card in the country (i.e. each card scores 1 point by default, or 2 points if you've completed the level it appears in, or 3 points if you've completed the country)

Once we start combining the data to send back (or if we get official data later), you should also lose points for a wrong answer.

tmtmtmtm commented 9 years ago

The basic version is now live at http://www.gender-balance.org/leaderboard (though not linked from anywhere)

This will need some design love from @zarino, and probably some shiny text from @MyfanwyNixon to accompany it too.

MyfanwyNixon commented 9 years ago

Are you a Gender Balance whizz? Then you'll see your name right here.

[rankings]

Enjoy the fame... but don't rest on your laurels: other players could overtake you at any time!

button: [Get back to the game]

zarino commented 9 years ago

Closing since https://github.com/everypolitician/gender-balance/pull/197 includes the leaderboard on the homepage, rather than a page of its own.