Open guidorice opened 4 years ago
After discussion and whiteboarding with @LanesGood , we decided that MapRoulette's Challenge entity is the appropriate level to source data from, into Scoreboard's Campaign entity.
Scoreboard has, at a high level, the entities Tasker, Campaign and Assignments. Tasker is an abstraction for sourcing data from a concrete Tasking Manager instance.
Currently, Scoreboard can utilize Campaigns that originate from Projects in OpenStreetMap US Tasking Manager (tasks.openstreetmap.us). Some of the project data is cherry-picked and copied into the Scoreboard database, and also tm_id
is used as a foreign key to the Task Manager's Project.
example project tm_id
Campaign <- tm_id (117) <- https://tasks.openstreetmap.us/project/117
Tasker can be extended to support additional Tasking Manager instances, for example:
MapRoulette has different terminology and different data model entities, so here are some concepts:
Therefore the MapRoulette Challenge appears to be the most appropriate entity to link the Scoreboard schema with the MapRoulette schema.
Recommendation: Skip this
There are 86 tables (relations) in the Scoreboard database, and perhaps many more in the MR database and api. Reconciling them would be a big task and it also may not even make sense.
In practice I think any new Tasking Manager implementations in Scoreboard are going to cherry-pick only the desired properties from a Challenge/Project, and then store a link to the original so it's probably fine if fields or tables are missing or named differently in Scoreboard.
None identified so far.
Recommendation: If there are any database changes required, do this as needed as part of the next task (Implement MapRoulette Task Manager classes).
Here are some next steps for my PR #458
api/tests/api/services
and support new TaskingManagerFactory.Updated integration plan:
MR Challenges do not need to display AOI (but perhaps they still should for visual consistency?)
I believe MR itself displays the AOI with a clustering symbology, rather than a BBox. Ideally we could do the same.
@guidorice as we start on this work again, are there items that require opening a new ticket?
I responded to @LanesGood on Slack re: resource scheduling.
@jvntf @necoline can you determine what edit statistics are available per user for each MR challenge? Does the API expose the number of tasks completed/skipped/marked too hard by a user for that challenge?
@LanesGood This endpoint returns the tasks existing for each challenge and exposes a
status
: 0 - Created, 1 - Fixed, 2 - False Positive, 3 - Skipped, 4 - Deleted, 5 - Already Fixed, 6 - Too Hard
priority
: 0 - High, 1 - Medium, 2 - Low
review
" 0 - Requested, 1 - Approved, 2 - Rejected, 3 - Assisted, 4 - Disputed
I don't see how to identify the user
@jvntf as mentioned, we still need to bring in the user data for each challenge. Is it possible to integrate the challenge leaderboards from this endpoint into the challenge page? I see that challengeId is an optional query.
@jvntf for user data extraction from OSMesa using MapRoulette hashtags, it looks like a changeset hashtag is available but optional. On a task for this challenge I see #maproulette #Kaart-MR-8968
in the changeset field in iD which would definitely be queryable in OSMesa However I see only Unmapped places in DRC #maproulette
autopopulated in the changeset when editing in iD from this task - which is likely not queryable from OSMesa.
In the setup for a challenge on MapRoulette, users are presented with the following options:
And in the MR github, I see that this exists as an issue: https://github.com/osmlab/maproulette3/issues/178 and an open PR: https://github.com/osmlab/maproulette3/pull/849
cc/@guidorice
@jvntf below is one approach to a potential MapRoulette challenge page if this data is available. If we are able to connect the MapRoulette challenge changeset hashtag to an OSMesa query, we can also display the feature stats currently visible on all Tasking Manager campaign pages.
If the data from the user/leaderboard
endpoint is the only data available, we can have the table headings display a user's score
, tasksCompleted
and avgTimeSpent
- if we think this information is useful
.
@jvntf reviewing your comment above, I realize that the overall challenge task breakdown is still available
To recap available data, I see that we have:
This could allow the following tables for each challenge page:
Does the above look correct and feasible to you?
@LanesGood correct and feasible
Dev notes on how to do the above:
Revise #593 as:
Implement MapRouletteAPI.getProjectStats(id), MapRouletteAPI.getProjectUserStats(id)
On load of any /campaign
-> if task manager
has getProjectStats
-> do that (challenge task status breakdown, undefined for Task Manager tasks)
if task manager
has getProjectStats
-> do that (challenge user leaderboard table, undefined for Task Manager tasks)
if has hashtag and hashtag is in OSMesa
-> return feature table (will exist for TM tasks, may exist for MR tasks)
Frontend Refactor -> Parse returned data for available tables -> construct accordingly. As of now this section of the front end is more hardcoded than perhaps is necessary cc @necoline
@jvntf the updated mockup for the Scoreboard MapRoulette Challenge page:
@LanesGood thanks for update, one question -> in the case that osmesa stats exist for a MR challenge, the participants
and total edits
section will be relevant, should we include those in the Panel
or drop them?
Integrate MapRoulette (MR) into Scoreboard and display a user’s active MapRoulette tasks on their dashboard.
Subtasks
MapRoulette api docs https://maproulette.org/docs/swagger-ui/index.html?url=/assets/swagger.json