Skip to content

Tagcloud#8104

Merged
thomasneirynck merged 12 commits intoelastic:masterfrom
thomasneirynck:tagcloud
Nov 21, 2016
Merged

Tagcloud#8104
thomasneirynck merged 12 commits intoelastic:masterfrom
thomasneirynck:tagcloud

Conversation

@thomasneirynck
Copy link
Copy Markdown
Contributor

@thomasneirynck thomasneirynck commented Aug 26, 2016

See #8149

moving tagcloud PR (#6975). resolved merge conflicts, checking if it runs in CI

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

jenkins, test this.

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

thomasneirynck commented Aug 29, 2016

This is now running again. I added it to the core-vis library, so it loads on startup without additional plugin installation commands.

  • verify/extend existing test suite (failing build!)
    • test suite not running properly. many tests skipped.
    • failing tests
  • error handling (empty ES responses throw unhandled errors)

To test this:

  • run npm install
  • easiest setup is choosing a foo.raw field from a logstash index in the tags aggregation section

small UI changes:

image


@stormpython FYI: apart from resolving merge conflicts, and some reshuffling of the code so it gets loaded on startup, this worked pretty much out of the box. Thanks!

@markharwood
Copy link
Copy Markdown
Contributor

If using significant terms is there an option to size text by the significance score?
Popularity != significance e.g. the circle sizes in this example visualization are sized by level-of-change not popularity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markharwood @thomasneirynck
here is where the size for the text is set.

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

@markharwood not sure. Have you seen this in any other Kibana visualizations? The tags are sized according to the aggregation-value. So e.g. counts, averages, ... I'm not quite sure if we are lifting out the significance score in any other viz either.

@markharwood
Copy link
Copy Markdown
Contributor

here is where the size for the text is set.

I'm not sure what metricsAgg is picking up as the value - the score or the doc count?
If your search is for bird flu doc count will tell you that the is most popular while significance score will tell you h5n1 is most interesting.

I'm not quite sure if we are lifting out the significance score in any other viz either.

We use it as the sort order for selecting which terms to surface but don't illustrate the magnitude of the score. This is what the diagram I linked to illustrates in terms of movement from a background frequency. It's possibly a little hard for users to interpret but the sizing of words in tag clouds is easier to grok and should be based on score not doc_count.

@stormpython
Copy link
Copy Markdown
Contributor

@markharwood @thomasneirynck its picking up the doc count. If I recall correctly, metricsAgg is from the Metrics dropdown that is selected, which defaults to count. I am not sure if significance score is an option in the Metrics dropdown. But if its added for significant terms, then it should just work out of the box.

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

for reviewers, this is an early check-in, so this will be revised most certainly.

For now, mainly looking for functional feedback: do the options in the forms make sense, does it work as expected, what is missing/what should be added, ...

@cjcenizal cjcenizal self-assigned this Sep 12, 2016
@jbudz
Copy link
Copy Markdown
Contributor

jbudz commented Sep 12, 2016

Awesome, this looks really good. Not looking at the code but a few notes while using it:
image
image

  • The current font doesn't match kibana's font family
  • The arc input is handy but also it can be difficult to reset it back to defaults
  • I'm not sure if it's possible with the current plugin, but word positioning isn't deterministic. On page refresh I can see it render twice, resize, etc moving the words around

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

@jbudz

about the determinism of word positioning. Agreed, that's a problem. At this point,I'm not quite sure how to resolve this. The problem is that at each visualization rendering, the entire visualization gets torn down and recreated (the layout algo indeed has some random elements). This is the standard flow of the visualization app. Ideally, there's an update hook, that when the visualizations options change (and the data remains the same), the same order can be reused. To be investigated.It'd be nice to incorporate this.

(thanks for the bug list, I'll address these)

@cjcenizal
Copy link
Copy Markdown
Contributor

Great work on this @thomasneirynck ! And thanks for coming back and offering guidance @stormpython . :)

A few comments:

Difficulty in relating input to output

I had a bit of a hard time understanding how my aggregations were impacting the tag cloud. This is a problem I have with all visualizations, but it seems a little more acute here because of the "volatile" nature of the tag cloud. This may be due to its non-determinism. It may also be due to the fact that tag clouds represent data in less-organized way, so it's more difficult for me to pin down specific relationships between different parts of the vis (as opposed to say, a bar chart).

Font style and weight

Maybe we can remove the oblique font style, as well as the bolder and lighter weight options. They didn't seem to have a noticeable impact on the way the vis appeared.

Orientations control

Maybe we can brainstorm on ways to make this control clearer? I don't quite understand how this control works. Possibly we could solve this with better labeling/help text.

The usefulness of tag clouds

Here are some useful articles I found on the pros and cons of tag clouds:

Personally, I don't think they are very useful but I'm sure that we have users who would like to use them. So I think this is a good addition to our product, and I think our users will appreciate it!

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

@cjcenizal thanks so much for the careful and measured feedback, I love that.

  • orientations control: this is something I experimented with, so it's good to have other people try it out. I wanted to avoid the ability of users to put in a conflicting feedback, and not have to deal with 3 separate controls. Mixed results, so let's talk ;)
  • usefulness: I think word clouds are good as an infographic. Something that's a little whimsical, and allows presenters to make part of their story 'pop'. It has a narrow range of usefulness. It is not good as a data visualization, in that you can only make the crudest quantitative inference about the underlying data. So I'd tend to agree with the first two links, who balance both ends in the same way. I think the message from the 3rd link is a little too glib; never say never. It is also a critique of using too simple of an underlying textual analysis (word counting as some sort of indication of relevance), that would reflect in any visualization using a term aggregation in Kibana.

@thomasneirynck thomasneirynck force-pushed the tagcloud branch 2 times, most recently from d812f6c to 6e3b617 Compare October 14, 2016 06:24
Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a very superficial glance-through and had a couple suggestions. I'll review more thoroughly once you're done.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on this comment?

Copy link
Copy Markdown
Contributor Author

@thomasneirynck thomasneirynck Oct 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, that file needs to be deleted since it is the directive for the UI-input we'll remove. it was a mistake to check this in, let alone the garbled language

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return `translate(${d.dx},${d.dy})`;

@jbudz
Copy link
Copy Markdown
Contributor

jbudz commented Oct 18, 2016

when you get a chance can we rebase this?

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

thomasneirynck commented Oct 22, 2016

Latest e220ae4.

  • removed gridded layouts. This is only relevant when we have multiple clouds. For now, that's not necessary.
  • removed circular angle selector, and added simplified orientation selection: single, right angles, multiple angles.
    image
    image
    image
  • trimmed code down, simplified directory structure
  • added animations between different clouds. this helps avoid nasty flickers as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please ignore these for know. I used these for testing internally. will need to remove them.

@thomasneirynck thomasneirynck force-pushed the tagcloud branch 4 times, most recently from d90712a to d4b5f7f Compare October 25, 2016 15:25
@thomasneirynck
Copy link
Copy Markdown
Contributor Author

for reference; using new double-ended slider for font-size selection:

image

@jbudz
Copy link
Copy Markdown
Contributor

jbudz commented Nov 21, 2016

Thoughts on adding a margin?
image

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

@jbudz ow that looks bad. yes, will add margin

@thomasneirynck thomasneirynck added the Feature:New Vis Request for a new visualization type label Nov 21, 2016
@thomasneirynck
Copy link
Copy Markdown
Contributor Author

jenkins, test this

@ppisljar
Copy link
Copy Markdown
Contributor

@cjcenizal do you want to take a look at the slider ?

@ppisljar
Copy link
Copy Markdown
Contributor

LGTM

@thomasneirynck thomasneirynck dismissed cjcenizal’s stale review November 21, 2016 21:37

this was a very early review. Code style issue + UI func addressed since.

@thomasneirynck thomasneirynck merged commit 31a6cba into elastic:master Nov 21, 2016
@elastic-jasper elastic-jasper mentioned this pull request Nov 23, 2016
elastic-jasper added a commit that referenced this pull request Nov 23, 2016
Backports PR #8104

**Commit 1:**
tagcloud squashed

* Original sha: 1282011
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-18T21:08:29Z

**Commit 2:**
ensure tags are not turned upside down

* Original sha: 68e09f4
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:43:41Z

**Commit 3:**
remove unnecessary background

* Original sha: dba79b8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:55:54Z

**Commit 4:**
add option to hide the label

* Original sha: 7f32544
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T04:08:45Z

**Commit 5:**
use double-ende slider for font-size selection

* Original sha: 00c9ea8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T15:26:14Z

**Commit 6:**
give slider some more space

* Original sha: b282084
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:38:55Z

**Commit 7:**
do not allow 0-sized tags

* Original sha: 42bbc39
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:44:26Z

**Commit 8:**
fix typo

* Original sha: f753e1a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:48:24Z

**Commit 9:**
make capitalization consistent

* Original sha: 63101d2
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T19:47:44Z

**Commit 10:**
doc checkin

* Original sha: fefa40a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:21:17Z

**Commit 11:**
minor doc edits

* Original sha: 84a8fc3
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:34:32Z

**Commit 12:**
doc build issues

* Original sha: cd2374a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:46:59Z
epixa pushed a commit that referenced this pull request Nov 23, 2016
Backports PR #8104

**Commit 1:**
tagcloud squashed

* Original sha: 1282011
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-18T21:08:29Z

**Commit 2:**
ensure tags are not turned upside down

* Original sha: 68e09f4
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:43:41Z

**Commit 3:**
remove unnecessary background

* Original sha: dba79b8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:55:54Z

**Commit 4:**
add option to hide the label

* Original sha: 7f32544
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T04:08:45Z

**Commit 5:**
use double-ende slider for font-size selection

* Original sha: 00c9ea8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T15:26:14Z

**Commit 6:**
give slider some more space

* Original sha: b282084
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:38:55Z

**Commit 7:**
do not allow 0-sized tags

* Original sha: 42bbc39
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:44:26Z

**Commit 8:**
fix typo

* Original sha: f753e1a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:48:24Z

**Commit 9:**
make capitalization consistent

* Original sha: 63101d2
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T19:47:44Z

**Commit 10:**
doc checkin

* Original sha: fefa40a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:21:17Z

**Commit 11:**
minor doc edits

* Original sha: 84a8fc3
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:34:32Z

**Commit 12:**
doc build issues

* Original sha: cd2374a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:46:59Z
@elastic-jasper elastic-jasper mentioned this pull request Nov 23, 2016
elastic-jasper added a commit that referenced this pull request Nov 23, 2016
Backports PR #8104

**Commit 1:**
tagcloud squashed

* Original sha: 1282011
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-18T21:08:29Z

**Commit 2:**
ensure tags are not turned upside down

* Original sha: 68e09f4
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:43:41Z

**Commit 3:**
remove unnecessary background

* Original sha: dba79b8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:55:54Z

**Commit 4:**
add option to hide the label

* Original sha: 7f32544
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T04:08:45Z

**Commit 5:**
use double-ende slider for font-size selection

* Original sha: 00c9ea8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T15:26:14Z

**Commit 6:**
give slider some more space

* Original sha: b282084
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:38:55Z

**Commit 7:**
do not allow 0-sized tags

* Original sha: 42bbc39
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:44:26Z

**Commit 8:**
fix typo

* Original sha: f753e1a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:48:24Z

**Commit 9:**
make capitalization consistent

* Original sha: 63101d2
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T19:47:44Z

**Commit 10:**
doc checkin

* Original sha: fefa40a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:21:17Z

**Commit 11:**
minor doc edits

* Original sha: 84a8fc3
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:34:32Z

**Commit 12:**
doc build issues

* Original sha: cd2374a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:46:59Z
epixa pushed a commit that referenced this pull request Nov 23, 2016
Backports PR #8104

**Commit 1:**
tagcloud squashed

* Original sha: 1282011
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-18T21:08:29Z

**Commit 2:**
ensure tags are not turned upside down

* Original sha: 68e09f4
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:43:41Z

**Commit 3:**
remove unnecessary background

* Original sha: dba79b8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:55:54Z

**Commit 4:**
add option to hide the label

* Original sha: 7f32544
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T04:08:45Z

**Commit 5:**
use double-ende slider for font-size selection

* Original sha: 00c9ea8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T15:26:14Z

**Commit 6:**
give slider some more space

* Original sha: b282084
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:38:55Z

**Commit 7:**
do not allow 0-sized tags

* Original sha: 42bbc39
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:44:26Z

**Commit 8:**
fix typo

* Original sha: f753e1a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:48:24Z

**Commit 9:**
make capitalization consistent

* Original sha: 63101d2
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T19:47:44Z

**Commit 10:**
doc checkin

* Original sha: fefa40a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:21:17Z

**Commit 11:**
minor doc edits

* Original sha: 84a8fc3
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:34:32Z

**Commit 12:**
doc build issues

* Original sha: cd2374a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:46:59Z
@epixa epixa added v5.1.1 and removed v5.1.0 labels Dec 8, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Backports PR elastic#8104

**Commit 1:**
tagcloud squashed

* Original sha: 1282011
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-18T21:08:29Z

**Commit 2:**
ensure tags are not turned upside down

* Original sha: 68e09f4
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:43:41Z

**Commit 3:**
remove unnecessary background

* Original sha: dba79b8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T03:55:54Z

**Commit 4:**
add option to hide the label

* Original sha: 7f32544
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T04:08:45Z

**Commit 5:**
use double-ende slider for font-size selection

* Original sha: 00c9ea8
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T15:26:14Z

**Commit 6:**
give slider some more space

* Original sha: b282084
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:38:55Z

**Commit 7:**
do not allow 0-sized tags

* Original sha: 42bbc39
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:44:26Z

**Commit 8:**
fix typo

* Original sha: f753e1a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T16:48:24Z

**Commit 9:**
make capitalization consistent

* Original sha: 63101d2
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T19:47:44Z

**Commit 10:**
doc checkin

* Original sha: fefa40a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:21:17Z

**Commit 11:**
minor doc edits

* Original sha: 84a8fc3
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:34:32Z

**Commit 12:**
doc build issues

* Original sha: cd2374a
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-11-21T21:46:59Z

Former-commit-id: 867ff10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported Feature:New Vis Request for a new visualization type Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v5.1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants