ProjectSidewalk / SidewalkWebpage

Project Sidewalk web page
http://projectsidewalk.org
MIT License
84 stars 24 forks source link

Add tagging system for common label descriptions #1131

Closed misaugstad closed 6 years ago

misaugstad commented 7 years ago

There are some label descriptions that are likely very common, or that we would love to have information about. Examples include:

It would be great if we could get these annotations a lot more frequently. One interview participant felt that typing this in for every label was getting tedious, so they suggested a drop-down menu with common descriptions, while still having the option of the free-form text field.

I really love the idea. Not sure that a drop-down menu is the best, per se, considering it is an extra click. I figure we could just display the different default descriptions in a row, and you can click on one to add it to the text field. This actually doesn't sound like too much work, either. Here is a quick mockup of what I am imagining.

image

In fact, this feels a lot like a 'tagging' system. Have we thought about using pre-defined tags? Of course this would not remove the need for a free-form text box, but perhaps it would make things easier for users, be a familiar system to them, and it would make querying for example of certain kinds of problems much much easier.

I think this could even be used to help with estimating the reliability of a user's labels and prompting in-situ training for them! What we have been thinking about is for users that we suspect are not very accurate, we could give them in-situ training on things we suspect they may not be proficient in labeling, we could lower our estimated probability that their labels are accurate in some access score model, or we could have another person audit the same streets as them.

A simple way that we have discussed to identify low-quality labelers, is to compare the label type distribution of their labels to the distribution of all labels (or labels within that neighborhood). This could then be extended if we have a tagging system. For example, maybe in some neighborhood, multiple users have found and tagged a large number of surface problems as having grass b/w the sidewalk blocks. But then there is this new user who has labeled 4 miles, but none of his surface problems have the "grass" tag. Maybe we could then do the in-situ training where we show them examples of surface problems that they should be labeling that have grass b/w sidewalk blocks.

jonfroehlich commented 7 years ago

I really like this too because it helps remind Turkers what to look for! In addition, it clear grows our knowledge base by expanding the amount of useful information per label--which could be used to train automatic recognition systems or incorporated into user-facing tools (e.g., how many problems are due to poorly placed fire hydrants might be a query a government may want to run).

Incidentally, almost two years ago, I suggested auto-completing descriptions , which I think we could also do but the tags have the advantage of: (i) requiring recognition rather than recall; (ii) helping remind workers what to label; (iii) can be clicked rather than typed.

manaswisaha commented 7 years ago

Thanks for this post! I like this too. Multiple participants have pointed this problem out - what are they supposed to name it, people having different names for it, or expressing a need for pulling a certain problem within a label type (say retrieve all light poles within Obstacles).

jonfroehlich commented 7 years ago

Another nice benefit of this is disambiguating proximal labels for clustering--if two obstacles in path are very close together but with different tags, they shouldn't be clustered.

misaugstad commented 7 years ago

Ooo good point! Nice idea.

jonfroehlich commented 6 years ago

This is another potential @aileenzeng task (if we keep her doing frontend stuff); however, of course, this particular task requires both frontend and backend work (the backend would have to deliver a list of common and/or curated tags that show up in the UI)

aileenzeng commented 6 years ago

Another feature that we could add would be updating tags based on the severity that the user chooses. (EX: if the user selects severity = 2 for curb ramps, one of the tags that could pop up is 'missing friction strip'). We could add in some of the tags from Labeling Codebook to see if that helps people understand what different severities should correspond to.

misaugstad commented 6 years ago

Ooooo very very good idea!!

aileenzeng commented 6 years ago

Here are some mockups that I did:

  1. Rectangular boxes around tags (similar to @misaugstad's mockup above - this just uses grey instead), one row only image When the user clicks a tag, it becomes grey: image It could also maybe autofill in the description box? image

  2. Rectangular boxes around tags, multiple rows image When expanded, it could do list out the rest of the labels (probably in alphabetical order?): image

  3. Underlined labels (@jonfroehlich's idea!) -- creates more room for labels image When a user clicks a tag, it becomes bold: image

aileenzeng commented 6 years ago

Here's a very tentative list of (static) tags that I've thought of for the different labels. I'm having some trouble thinking of good tags for the missing curb ramp / other categories.

Curb Ramp Missing Curb Ramp Obstacle in Path Surface Problem Other
Narrow   Trash can Uneven surface  
Points into traffic   Fire hydrant Unleveled surface  
Missing friction strips   Pole Cracks  
Steep   Tree Narrow  
Rough surface    Vegetation   Grass  
(Water?)     (Dirt path?)  

It'd be nice to pull tags from the database, although we'd need to figure out how often this would happen. We might also need to figure out if these would differ by region (cities? neighborhoods?)

aileenzeng commented 6 years ago

Here's what the label descriptions currently look like:

  1. Curb Ramp image
  2. Obstacle in Path image
  3. Surface Problem image

Missing Curb Ramp/Other don't have any labels attached to them: image image

All the tag are static at the moment. When clicked, they'll automatically add the text from the tag box into the description box. (An example of this is above in the curb ramp picture).

Before I submit a pull request, I just wanted to check to see if there were any potential tags that we want to use for missing curb ramp/other or if there are any existing tags that should be swapped out with different ones?

misaugstad commented 6 years ago

I just scanned through the descriptions actual users had used when placing labels to get some common descriptions:

Missing curb ramp

Other

I'll also take a quick look at the other label types as well, but these two were the ones where we were low on descriptions.

misaugstad commented 6 years ago

Oh and @aileenzeng these mockups are looking AWESOME, I'm loving it!

misaugstad commented 6 years ago

It'd be nice to pull tags from the database, although we'd need to figure out how often this would happen.

What do you mean by pulling tags from the database?

misaugstad commented 6 years ago

And do we want to only add the text to the descriptions..? Or do we want to have a defined taggging system (and the appropriate tables to the database)? The fundamental question here is if we want to add a true tagging system, or if we just want to make it easier to add label descriptions? I really like the idea of a tagging system, which seems a lot more flexible. I can envision other types of missions where users vote yes/no not only for label types, but also for the tags on the labels, and could go through and add tags to labels. This also makes it easier to have multiple tags.

Thoughts @aileenzeng and @jonfroehlich ?

aileenzeng commented 6 years ago

@misaugstad These labels are are really great!! I'll add the first alternate routes/unclear tags to the Missing Curb Ramp label and the first three tag suggestions for Other.

What do you mean by pulling tags from the database?

I think @jonfroehlich and I were talking about somehow pulling out popular tags from the database to use as tags. (Right now, all the label tags are being hard-coded into UtilitiesSidewalk.js)

I also like the idea of having a tagging system, especially if it allows us to build future features more easily.

misaugstad commented 6 years ago

I think @jonfroehlich and I were talking about somehow pulling out popular tags from the database to use as tags. (Right now, all the label tags are being hard-coded into UtilitiesSidewalk.js)

Does this mean like taking common descriptions that users make that don't already have tags and adding them (kind of like I did in my longer comment above)?

misaugstad commented 6 years ago

@aileenzeng Another thing to do related to this issue is to make sure we are logging the events when someone clicks on a tag. Let me know if you need any help finding the logging code, and feel free to post your ideas for how to name the actions you're adding to the logging.

aileenzeng commented 6 years ago

@misaugstad I realized that I never got around to making a pull request or to responding to your comment (oops!)

Currently, I log 'ContextMenu_TagClicked` as the action. In the note, it logs more specific info (EX: Tag:grass,auditTaskId:15436). I was wondering if it'd be more helpful to be more specific in the action (something like ContextMenu_TagClicked_Grass) instead?

aileenzeng commented 6 years ago

Does this mean like taking common descriptions that users make that don't already have tags and adding them (kind of like I did in my longer comment above)?

I think this would be for all tags, so what I'm doing now could be like a 'placeholder' for now? We could make this a separate issue (+might need to get some more clarification)

aileenzeng commented 6 years ago

Also here's an update: image image

image

image

image

Still a little bit hesistant about some of the other tags (esp. narrow sidewalk?)

misaugstad commented 6 years ago

Currently, I log 'ContextMenu_TagClicked` as the action. In the note, it logs more specific info (EX: Tag:grass,auditTaskId:15436). I was wondering if it'd be more helpful to be more specific in the action (something like ContextMenu_TagClicked_Grass) instead?

Yeah this is a tough one. It all depends on the types of queries we expect to run on the database most often. I don't think there is an obvious choice for what to do, so I guess we should stick what whatever is more simple (I'm assuming that would be having ContextMenu_TagClicked instead of ContextMenu_TagClicked_Grass, but it is up to you).

Still a little bit hesistant about some of the other tags (esp. narrow sidewalk?)

From the discussion in the thread on issue #1252 I think we are going to have the "narrow sidewalk" tag for the SurfaceProblem label.

misaugstad commented 6 years ago

Okay I'm going to describe how I see this all working now to make sure that we are on the same page; @aileenzeng let me know if there is anything that doesn't jive with what you were thinking.

  1. There will be pre-defined tags in the database, and the front-end will query for the list of tags when the audit page loads (instead of reading from Utilities.js). NOTE: I will help with this part by doing the back-end stuff; I'm excited to tag-team this issue!
  2. Clicking on the tags will not auto-fill the description box. Multiple tags can be selected. The tagging system will be separate from the description box (and we can periodically go through the descriptions that users are filling in to decide what new tags should be added).
  3. Maybe we will show different tags (or just reorder them!) depending on the severity that the user chose. This will likely be a separate issue; there are pros and cons to this method, and it would require some extra animation I expect (do the tags not appear until severity has been rated? Or do they shift around and change once severity is chosen?).

Side note: we need a better description than "unleveled surface". How about just the word "uneven"?

aileenzeng commented 6 years ago
  1. There will be pre-defined tags in the database, and the front-end will query for the list of tags when the audit page loads (instead of reading from Utilities.js). NOTE: I will help with this part by doing the back-end stuff; I'm excited to tag-team this issue!
  2. Clicking on the tags will not auto-fill the description box. Multiple tags can be selected. The tagging system will be separate from the description box (and we can periodically go through the descriptions that users are filling in to decide what new tags should be added).

I like both of these ideas a lot! (Also my branch for this is 1131-add-common-labels)

Maybe we will show different tags (or just reorder them!) depending on the severity that the user chose. This will likely be a separate issue; there are pros and cons to this method, and it would require some extra animation I expect (do the tags not appear until severity has been rated? Or do they shift around and change once severity is chosen?).

I haven't looked into this a ton yet, but I find when I'm labeling, a lot of my high severity ratings (for say, curb ramps) sometimes end up being a combination of multiple low severity labels. I think it might be fine to just have consistent labels.

Side note: we need a better description than "unleveled surface". How about just the word "uneven"?

Sounds good! It's definitely more concise.

misaugstad commented 6 years ago

@aileenzeng okay I've set up the backend for the tagging system; it is now ready for you to make the changes to the front-end.

You will see that the front-end now reads the label tags from the database, and I print the array of tags to the console on line 332 of ContextMenu.js. I didn't modify your code with the old tags, so you will need to make the necessary changes there and delete the old code. What you need to keep track of is a list of tag_ids.

Then to send the tags back to the database, I've written that part on the backend, and I've added a TODO at line 88 of Form.js, denoting the place where you need to send that list of tag ids that you keep track of.

Let me know here or on Slack if you want more clarification on anything!