Twitter analysis percentage distribution



I am pushing a twitter stream in real time to my elastic stack after some treatment in python.
Particularly a sentiment analysis which adds a field "sentiment" to each tweet.

It's a string with 3 possible values : Neutral / Positive / Negative.

Now I want to visualize the evolution of this field in percentage on a timeline. However I would like to keep the summed up distribution at each time.
To illustrate, something like this :

Do you have any clue ? Even with Timelion or VisualBuilder I can't use the field "sentiment" properly.


Hello ! Still did not find a solution. Any ideas ?

(Spencer Alger) #3

Sorry this got sort of lost in the shuffle! You should be able to use an Area Chart, using a "Date Histogram" X-Axis, a "Split Series" bucket using the "Terms" aggregation on the sentiment field, and finally switching over to "Metrics and Axes" to switch the "Y-Axis" mode to "percentage":


Hello, thanks it's working perfectly.

Now, I understand my date histogram is taking sample for the defined interval and calculating for each interval the resulting percentage.
Is it possible to compute things differently by taking the previous values into account when calculating the percentage ? For example if I analyse one month with an interval of one day, I would like that day 4 percentage takes the previous day 1 2 and 3 into account. Is that possible ?

Thanks in advance

(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.