Cool stats!

Nao

  • Dadman with a boy
  • Posts: 16,079
Cool stats!
« on November 26th, 2013, 07:21 PM »Last edited on December 4th, 2013, 02:15 PM
Feature: Statistics charts
Developer: Nao
Target: everyone
Status: 90% (stats page believed complete; planning to implement on other stats, but not right now.)

http://wedge.org/do/stats/

Look at that... :)

Needs some work, most notably I'll implement some select boxes to automatically refresh data (or Ajaxively refresh it), so you can get a 'range' of your choice, and/or disable the entries that you're not interested in (new members, etc.)
But this is what I managed to cook up after a few hours of work, and I'm very happy with it. Great plugin, really! It only had a bug which prevented the tooltips from working, so I fixed that, and I may start contributing to the project, because I'm thinking of adding more details in tooltips, etc.

Feedback welcome, as always!

:edit: Read following posts to view progress on implementation, which is now 100% on the main stats page.
:edit: Moved the topic to public!

Re: Cool stats!
« Reply #16, on December 4th, 2013, 02:03 PM »
Works 100% in mobile, now!
The main problem I had was with the label list. On a very small screen, it just got confusing, they were overlapping each other.
I rewrote the script to actually skip up 50 or 75% of all labels, depending on the available width, to make it all clearer.

Well, I'm pretty much ready to commit... I think.

Re: Cool stats!
« Reply #17, on December 4th, 2013, 02:56 PM »
Wow!! Looks amazing on mobile :D

Re: Cool stats!
« Reply #18, on December 4th, 2013, 03:30 PM »
I know... :eheh:

And until yesterday, it was a bit crappy! I put a lot of thought into it today. (Heck, I learned more about canvas drawing to customize that library. Plus, I'd always wanted to look into using canvas for my own work in the future... This time was not lost, so double win.)

I'm also planning to add a 'zoom' feature so that I can default to the 'Last 10 years' feature (which should probably be something like 'all', because in the meantime I rewrote it to support both monthly and quarterly updates, making it potentially possible to support, hmm, 40-year old forums..??), and then you can choose a 'zone' to extend into daily stats. A la Github, if you will.

Re: Cool stats!
« Reply #19, on December 5th, 2013, 10:05 AM »
Nao, you beauty! I love it. Sick stuff, bro.

Re: Cool stats!
« Reply #20, on December 5th, 2013, 10:58 AM »
Thanks!

I'm currently working on the zoom thing. I'm not sure it'll be ready for today, but I'll see what I can do.

Re: Cool stats!
« Reply #21, on December 5th, 2013, 06:17 PM »
First, purely from an aesthetics point of view it is sexy beautiful. Charts just kind of do it for me. So you nailed it there.

From usefulness/coolness point of view I like it. I don't really think you need to include lifetime stats. The decade stats effectively accomplishes that (at least for the next 10 years I suppose :eheh:)

One stat I'd be interested in seeing is Topic Views Overall. Not sure how easy that would be, but I'd be willing to bet the decline in activity at Wedge.org is a lot less in that statistic. I have a feeling there are a lot of people out there following Wedge who like me don't feel like they have the knowledge to contribute a lot, but come here everyday and multiple times a day to see what's going on hoping for that post they feel they can finally contribute something useful.

So yeah, the stats rock :cool:

Aaron Smith


Re: Cool stats!
« Reply #22, on December 5th, 2013, 06:41 PM »
My zoom feature is 90% done. I'm currently able to select a range, although I'm not doing anything with it (for now.)
Quote from Aaron Smith on December 5th, 2013, 06:17 PM
First, purely from an aesthetics point of view it is sexy beautiful. Charts just kind of do it for me. So you nailed it there.
Yup, and I think I improved (a bit) on the original script, when it comes to visuals. Just little details. The bulk of my rewrite, though, was in adding many, many more features that I think are useful in daily use...
Quote
From usefulness/coolness point of view I like it. I don't really think you need to include lifetime stats. The decade stats effectively accomplishes that (at least for the next 10 years I suppose :eheh:)
With my new technique, I could effectively go up to about 50 years, so maybe it just makes more sense to say 'lifetime'.
I'm renaming the 'last_decade' variable to 'all'. That should do. 50 years, in Internet time, is like 2 millennia... (Hmm, Chrome insists on saying that's a typo. No, it's not..?! Or maybe it doesn't agree with my comparison, I don't know...)
So, considering Wedge is unlikely to be used in 50 years, and even if it is, it'll only make the charts very ugly (rather than 'simply' break), I'm okay with not having a limit/range on these queries.
Quote
One stat I'd be interested in seeing is Topic Views Overall. Not sure how easy that would be, but I'd be willing to bet the decline in activity at Wedge.org is a lot less in that statistic.
Well, if you're talking about Page Hits (which is as close as you'll get to Topic Views, since that particular stat isn't tracked in {db_prefix}log_activity, just like in SMF or other forks, but theoretically could be added through plugins), it's also trending down. But it only makes sense, because if you're replying to a topic, chances are, you're viewing it first...
Quote
I have a feeling there are a lot of people out there following Wedge who like me don't feel like they have the knowledge to contribute a lot, but come here everyday and multiple times a day to see what's going on hoping for that post they feel they can finally contribute something useful.
Well, duly appreciated!
Re: Cool stats!
« Reply #23, on December 5th, 2013, 11:57 PM »
Ladies & gentlemen, I present to you... Stat zooming!

Here's how to do it...
- In the first select box, choose a time range that's very large, i.e. either a year (2013, etc.) or 'Everything'. Zooming obviously doesn't work on daily stats, since you already are at maximum zoom.
- Check out a month, or series of months (it also works on quarters, but Wedge isn't old enough to be forced to show quarters, so it's not properly tested); hold your mouse button on the LEFT of the month you're interested in, then move it to the middle of that month, so that the vertical axis representing the month is entirely covered by your selection.
- After a quick ajax load, the chart will be updated to show daily stats for the month you wanted.
- If you select two months, you'll also get daily stats.
- Three months or more, and you'll get monthly averages.

There are probably still a few hickups here and there, it's not working 100%, most notably if you select to the right of the last entry in the chart, you'll get undefined results. Or, it doesn't work on mobile (needs some adjustments to events). I'll deal with that tomorrow. For now, it's bed time for me.

Please post your thoughts, likes and dislikes! ^o^

Re: Cool stats!
« Reply #24, on December 6th, 2013, 12:41 AM »
Ok that's cool. Probably not necessary, but definitely cool.

Re: Cool stats!
« Reply #25, on December 6th, 2013, 02:26 AM »
I really like it!!! :)

Re: Cool stats!
« Reply #26, on December 6th, 2013, 07:37 AM »
Woo!  Liking that....a lot! :cool:

Re: Cool stats!
« Reply #27, on December 7th, 2013, 11:29 PM »
Looks great, Nao! Well done indeed. :)

Re: Cool stats!
« Reply #28, on December 8th, 2013, 12:04 AM »
Thanks!

I'm kind of disgusted with the amount of time I spent on this, though... (One week is about ten times too much.)

Then again, I just spent my entire evening on my good old menu system, just to make its animations hardware accelerated. I'm beyond hope, at this point.

Re: Cool stats!
« Reply #29, on August 7th, 2014, 05:22 PM »
Quote from Nao on December 4th, 2013, 12:16 AM
Yes, they're disabled in wedge.org, because they obviously add one DB hit per page, and I thought Google Analytics would be more accurate anyway.[1]
The latest update (not live here, though!) actually accounts for disabled items. Only 'hits' for now, but in the end, could add more stuff.
Hits are usually not even shown at all, but they used to be enabled, so the old stats (< 2012) still have hits in them. You can look at them, if you want...
 1. It took me years to add Analytics, though... I figured, no need to force a small script to load for everyone, if I'm never looking at these stats. I only installed it because I wanted to know the IE market share here. Still less than 5%, all versions included. Lulz.
Forgot about that when I went from SMF to Wedge. Stupid question : how can I integrate Google Analytics in Wedge ? Thanks !

Re: Cool stats!
« Reply #30, on August 15th, 2014, 05:13 PM »
Hmm this is something that isn't supported by default, you need to add extra HTML somewhere at the bottom... There are multiple ways to do that, although there's none that I can guarantee to be 'easier' to implement. (Ahem...)