streetcomplete / sc-statistics-service

Statistics generation service for StreetComplete
GNU General Public License v3.0
10 stars 4 forks source link

Leaderboards by country and by quest #6

Closed westnordost closed 4 years ago

westnordost commented 4 years ago

A possible extension to this service would be to store leaderboards by country and by quest.

These leaderboards should not be shown directly in the app but shown for example like this:

So, you can see how you are doing yourself, but there is no direct comparison to other users.

Taken into account for these leaderboards would only the users currently in the database. Depending on the runtime of the SQL queries to ascertain the rank of a user worldwide, in his country, and the same for each quest type, it will most probably be necessary to add additional tables in which to store the leaderboards and update these tables in a scheduled task.

Implementation-wise, there should be DAO(s) for these table(s), a script that updates these tables and probably the whole JSON-generation for the API should move into an own class instead of being in get_statistics.php.