greenelab / word-lapse

Explore how a word changes over time
https://greenelab.github.io/word-lapse/
Other
6 stars 3 forks source link

Adding more context to tagged tokens #39

Closed danich1 closed 2 years ago

danich1 commented 2 years ago

I received feedback that we should be more explicit on disambiguating tagged tokens from non-tagged tokens. Roughly this breaks down in the following tasks items:

vincerubinetti commented 2 years ago

It will be difficult to make it look good, I think. But we can technically do all of this. I'll experiment and show you some ideas.

danich1 commented 2 years ago

It will be difficult to make it look good, I think. But we can technically do all of this. I'll experiment and show you some ideas.

Sounds good. Anything I can do to help let me know.

vincerubinetti commented 2 years ago

Here's what it looks like using the tag emoji 🏷️

image

I don't think this looks very good or much more readable than the asterisks. Also, the appearance/design of emojis will be different on every platform/device. Some (more obscure) platforms might not even have an image for the tag emoji.

Another option is to use a nice professionally designed SVG icon: https://fontawesome.com/icons/tag?s=solid . But due to the nature of this visualization -- how it's text based and text, especially text wrapping, in svg is a huge pain -- this will be prohibitively complex. At least, I don't think the complexity and fragility of it will be worth the gains. Aside from it not looking good for the same reasons as in the above screenshot (imo), there will be spacing and other issues.

My suggestion would be to just go with a larger, more visible plain-text/unicode symbol, if that was the issue with the asterisks. There are plenty to choose from. Here's how that could look like:

image

Note that another problem with using the emoji is that you can't easily make it match the color of the text it's in, whereas with a plain text unicode character you can. This maybe isn't a problem in the screenshot above, but in the two-year comparison mode it makes it harder to visually parse.

vincerubinetti commented 2 years ago

As for the other bullet points, I was thinking of just having a tooltip that has a brief, 1 sentence description of what it means to be "tagged", and then a link in the tooltip to the NCBI taxonomy browser.

I need help with that text. Something like this?

This word is "tagged" in the model, meaning it comes from an entity with additional metadata here

danich1 commented 2 years ago

My suggestion would be to just go with a larger, more visible plain-text/unicode symbol, if that was the issue with the asterisks.

I agree enlarging the asterisks is a better solution.

I need help with that text. Something like this?

This word is "tagged" in the model, meaning it comes from an entity with additional metadata here

This word identified (tagged) to represent a Species with additional metadata here

I may need to provide you with this information, but I think the wording above with the appropriate entity type would suffice. Instead of Species it would be replaced with gene if the word is suppose to be a gene or cell-line if the word is suppose to be a cell-line. The backend will need to be updated to provide entity type to you, but does that work for you?

vincerubinetti commented 2 years ago

Yep that works for me. I'll await the info from the backend. I'm assuming I can't glean what the type of entity is from the species_ prefix. It wouldn't be gene_ when it's a gene?

danich1 commented 2 years ago

Yep that works for me. I'll await the info from the backend. I'm assuming I can't glean what the type of entity is from the species prefix. It wouldn't be gene when it's a gene?

This all works except for MESH terms. They have the disease and chemical prefixes removed as it allows for the concept mapper to identify those ids. Small tweak is needed on the backend to make sure that prefix is returned.

danich1 commented 2 years ago

Here is the list of metadata urls that you will need for redirecting users:

Gene    https://www.ncbi.nlm.nih.gov/gene/<id goes here>
Species https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=info&id=<id goes here>
Cellline    https://web.expasy.org/cellosaurus/<id goes here>
Disease https://id.nlm.nih.gov/mesh/<id goes here> (D or C has to be capitalized)
Chemical    https://id.nlm.nih.gov/mesh/<id goes here> (D or C has to be capitalized)