Creating replies by time span.
This commit is contained in:
parent
c8e7509e6a
commit
33dccbc851
@ -4,7 +4,7 @@ asDictionaryForWeb
|
|||||||
| tweets tweetsHistogramData repliesHistogramData quotesHistogramData retweetsHistogramData |
|
| tweets tweetsHistogramData repliesHistogramData quotesHistogramData retweetsHistogramData |
|
||||||
tweets := self messages.
|
tweets := self messages.
|
||||||
tweetsHistogramData := self tweetsByTimeSpan: 7.
|
tweetsHistogramData := self tweetsByTimeSpan: 7.
|
||||||
repliesHistogramData := self repliesByWeeksTimeSpan.
|
repliesHistogramData := self repliesByTimeSpan: 7.
|
||||||
quotesHistogramData := self quotesReportData.
|
quotesHistogramData := self quotesReportData.
|
||||||
retweetsHistogramData := self retweetsReportData.
|
retweetsHistogramData := self retweetsReportData.
|
||||||
|
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
accessing
|
||||||
|
repliesByTimeSpan: divisions
|
||||||
|
|
||||||
|
| tweetsByTimeSpan xAxis labels |
|
||||||
|
tweetsByTimeSpan := self collectMessages: [ self replies ] byTimeSpanSplits: divisions.
|
||||||
|
xAxis := OrderedCollection new.
|
||||||
|
(tweetsByTimeSpan values collect: [ :collection | collection size ]) do: [ :number |
|
||||||
|
xAxis add: ($' asString), (number asString), ($' asString)
|
||||||
|
].
|
||||||
|
labels := OrderedCollection new.
|
||||||
|
tweetsByTimeSpan keys do: [ :string |
|
||||||
|
labels add: ($' asString), string, ($' asString)
|
||||||
|
].
|
||||||
|
^ {
|
||||||
|
tweetsByTimeSpan.
|
||||||
|
('[', (',' join: xAxis), ']').
|
||||||
|
('[', (',' join: labels), ']').
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user