Creating retweets static web report histogram.

This commit is contained in:
ruidajo 2022-06-04 17:49:18 -05:00
parent 91744733bd
commit 94b104e0e8
2 changed files with 18 additions and 1 deletions

View File

@ -1,11 +1,12 @@
accessing accessing
asDictionary asDictionary
| tweets tweetsHistogramData repliesHistogramData quotesHistogramData | | tweets tweetsHistogramData repliesHistogramData quotesHistogramData retweetsHistogramData |
tweets := self messages. tweets := self messages.
tweetsHistogramData := self tweetsByWeeksTimeSpan. tweetsHistogramData := self tweetsByWeeksTimeSpan.
repliesHistogramData := self repliesByWeeksTimeSpan. repliesHistogramData := self repliesByWeeksTimeSpan.
quotesHistogramData := self quotesReportData. quotesHistogramData := self quotesReportData.
retweetsHistogramData := self retweetsReportData.
^ { 'profile-card-avatar' -> self profileImageFile fullName. ^ { 'profile-card-avatar' -> self profileImageFile fullName.
'profile-card-avatar-url' -> self profileImageUrl. 'profile-card-avatar-url' -> self profileImageUrl.
'profile-card-fullname' -> self name . 'profile-card-fullname' -> self name .
@ -18,6 +19,8 @@ asDictionary
'tweets-histogram-quantity' -> tweetsHistogramData second. 'tweets-histogram-quantity' -> tweetsHistogramData second.
'replies-histogram-labels' -> repliesHistogramData third. 'replies-histogram-labels' -> repliesHistogramData third.
'replies-histogram-quantity' -> repliesHistogramData second. 'replies-histogram-quantity' -> repliesHistogramData second.
'retweets-histogram-labels' -> retweetsHistogramData third.
'retweets-histogram-quantity' -> retweetsHistogramData second.
'quotes-histogram-labels' -> quotesHistogramData third. 'quotes-histogram-labels' -> quotesHistogramData third.
'quotes-histogram-quantity' -> quotesHistogramData second. 'quotes-histogram-quantity' -> quotesHistogramData second.
} asDictionary } asDictionary

View File

@ -0,0 +1,14 @@
accessing
retweetsReportData
| tempDict labels xAxis |
tempDict := self retweetsSortedByOccurrences.
labels := tempDict keys.
labels := labels collect: [ :profile | ($' asString), '@', profile, ($' asString) ].
xAxis := tempDict values.
xAxis := xAxis collect: [ :value | ($' asString), (value asString), ($' asString) ].
^ {
tempDict.
('[', (',' join: xAxis), ']').
('[', (',' join: labels), ']').
}