Skip to content

Commit

Permalink
update stats
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Dec 14, 2024
1 parent b8eadf2 commit 7c1fb2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
16 changes: 8 additions & 8 deletions app/views/entries/review.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@
%span= format_number(your_avg_words)
- if @year.to_s == "2024"
.s-review-details{style: "margin: 30px auto;"}
- if your_avg_words > 274
- if your_avg_words > 271
- compared = 'way more'
- elsif your_avg_words > 183
- elsif your_avg_words > 181
- compared = 'more'
- elsif your_avg_words < 91.5
- elsif your_avg_words < 90.5
- compared = 'way less'
- else
- compared = 'less'
%p= "That's #{compared} than the average of all Dabble Me users (183 words per post)."
%p= "That's #{compared} than the average of all Dabble Me users (181 words per post)."
%p
%span Collectively, all Dabble Me users could have wrote 58 books equivalent to Edward Abbey's,
%span Collectively, all Dabble Me users could have wrote 69 books equivalent to Edward Abbey's,
%span<= link_to "The Monkey Wrench Gang", "https://amzn.to/3BsRghE", target: :_blank
%span !
.clearfix
Expand All @@ -138,9 +138,9 @@
.center{class: add_class}
.s-entry-date
%h2 Most Frequent Words
- if @year.to_s == "2024"
%h3
%span= "We're all still journaling in first-person...we collectively used <i>\"i\"</i> 203,180 times in our entries!".html_safe
-# - if @year.to_s == "2024"
-# %h3
-# %span= "We're all still journaling in first-person...we collectively used <i>\"i\"</i> 203,180 times in our entries!".html_safe
.s-review-details
- grouped_words = @words_counter.group_by(&:itself).transform_values(&:count).sort_by { |_k, v| v }.reverse.to_h
- grouped_words = grouped_words.select { |word, count| !Entry::COMMON_WORDS.include?(word) }
Expand Down
9 changes: 8 additions & 1 deletion lib/tasks/entry.rake
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ namespace :entry do
# "Most Frequent Words:"
# i: 216,727


# "****************************************************************************************************"
# "STATS FOR 2024"
# "****************************************************************************************************"
# "Users created: 3,298"
# "Entries created in 2024: 41,815"
# "Entries for 2024: 40,437"
# "Total words: 7,324,119"
# "Avg words per post: 181.12419318940573"

p "*"*100
p "STATS FOR #{year}"
Expand Down

0 comments on commit 7c1fb2f

Please sign in to comment.