learntextvis / code-samples

draft code to communicate ideas
0 stars 0 forks source link

Concordance Plot (P1) #5

Open iros opened 8 years ago

vlandham commented 8 years ago

Background

Show in text where all the appearances of a given word typed into a search box appear.

Clarifications Required:

arnicas commented 8 years ago

Dammit, I lost the link again to your concordance demo, Jim.

Multi-document is a common feature for this type of display, e.g. this search for applause in the debates:

image

So yes, support multi-doc side-by-side comparisons.

In this display, the bars are showing 100% and are normalized to the same size. A good UI option would be to allow a resize so they show relative lengths, too. Then they become a simple horizontal bar chart of the doc lengths.

We should always show the word count of the doc(s) (more important than char count IMO), and hit counts for all searches done in each doc.

(A nice-to-have would be a vis of those too: stacked bar of the hits per doc/vs. doc size?)

A nice P2 feature would be to have multiple searches possible (different colored lines?) up to some reasonable number.

Note that this bar display is a version of a "timeseries" display, but it's not doing any summing over any bin interval. We could treat it as a degenerate case of the timeseries + search components.

Note also that this is another type of common concordance display, keyword in context: image

This is probably a widget/vis type we need to plan for too, which may appear in some tooltips (such as word clouds). UI config options for this usually include how much context left-and-right to display (usually characters is fine).

More comments when I find/get the link to Jim's thing again, sorry.

arnicas commented 8 years ago

Comments on the demo, I found the link:

image

Let's highlight (somehow) the "line" we're mousing over - maybe make it taller? help

Will be solved in the config object, I hope, but people should be able to set how the title of the doc appears (and maybe a subtitle field for attribution/source). As said above, show word counts for the total doc length.

Bug: Something went wrong with the display for the third doc I tried, notice?

We may want to make a tooltip component that either shows a single line of text for Keyword Context or shows multiple lines (KWIC component). A single line is a simple case of a KWIC display. So let's consider that for how the text is displayed here.

arnicas commented 8 years ago

Here's a concept mockup related to both the KWIC and the concordance -- single document case first: single_doc_corpus

arnicas commented 8 years ago

Multi-doc design requires some thinking about how to make it general for the layout to work in both cases.. also would be nice to be able to resize the bars to reflect length differences in the docs. (Feature creep but it's useful as a display of doc lengths, assuming length is a count of words.)

image

arnicas commented 8 years ago

I renamed this to "concordance plot" which is probably how the repo should look too - to be specific enough to not confused anyone else