Last modified: 2014-05-16 20:10:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47179, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45179 - Skin and active editor correlation
Skin and active editor correlation
Status: REOPENED
Product: Analytics
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Dan Andreescu
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-19 23:35 UTC by Matthew Flaschen
Modified: 2014-05-16 20:10 UTC (History)
15 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Last SQL script emailed by Oliver (806 bytes, text/x-sql)
2013-02-20 00:05 UTC, Matthew Flaschen
Details

Description Matthew Flaschen 2013-02-19 23:35:01 UTC
On English Wikipedia, among people who made 5 or more edits to the main namespace (namespace 0), what is the percentage using each skin?

Discussion started at http://lists.wikimedia.org/pipermail/analytics/2013-January/000362.html .  Several people have helped out, but we still haven't hit a script that we're sure is correct.
Comment 1 Matthew Flaschen 2013-02-19 23:38:58 UTC
I left one part out:

Five or more edits to the main namespace *in the last month*

The goal is to answer the question for active editors.
Comment 2 Diederik van Liere 2013-02-20 00:02:16 UTC
Can you add the latest version of the mysql query as an attachment?
Comment 3 Matthew Flaschen 2013-02-20 00:05:12 UTC
Created attachment 11810 [details]
Last SQL script emailed by Oliver
Comment 4 Matthew Flaschen 2013-02-20 00:05:55 UTC
I posted the last version by Oliver, but it seems (though I'm not positive) that Dan's suggestion (http://lists.wikimedia.org/pipermail/analytics/2013-January/000380.html) regarding the left join is correct.
Comment 5 Oliver Keyes 2013-02-20 12:00:19 UTC
Yup; as said, even with a left join it comes up short.
Comment 6 Dan Andreescu 2013-03-28 19:09:57 UTC
The query that produces the answer to the question posed here:

 select coalesce(up_value, 'default') as skin,
        count(*) as skin_users
   from (select user.user_id,
                count(*) as edits_in_last_30_days
           from recentchanges
                    inner join
                user            on user.user_id = recentchanges.rc_user
          where recentchanges.rc_namespace = 0
            and recentchanges.rc_type < 2
            and recentchanges.rc_user > 0
          group by user_id
         having edits_in_last_30_days >= 5
        ) as active_editors
            left join
        user_properties     on user_properties.up_user = active_editors.user_id
                           and user_properties.up_property = 'skin'
  group by skin;

My fumbling process to find this query, if anyone's interested:

https://gist.github.com/milimetric/5262726

And results:

/*
+-------------+------------+
| skin        | skin_users |
+-------------+------------+
|             |       2525 |
| 0           |         32 |
| chick       |         21 |
| cologneblue |        104 |
| default     |      26582 |
| modern      |        329 |
| monobook    |       2810 |
| myskin      |          8 |
| nostalgia   |         15 |
| simple      |         21 |
| standard    |         98 |
| vector      |         74 |
+-------------+------------+
*/
Comment 7 Matthew Flaschen 2013-03-29 20:55:21 UTC
You said at https://bugzilla.wikimedia.org/show_bug.cgi?id=44448#c27 that default is Monobook.  Are you sure that's correct?  If so, it means almost no active editors use Vector.

I think this query should map the values so it only shows rows for actual skins (no blank, blank row, 0), so I'm reopening for now.
Comment 8 Matthew Flaschen 2013-03-29 20:55:58 UTC
Sorry, I meant to say "no default", not "no blank".
Comment 9 Oliver Keyes 2013-03-29 22:14:01 UTC
I think he may have misspoken; default is almost certainly Vector. And, actually when it comes to serious power users a substantial chunk are still on monobook, globally.

So you only want 'places where the user has actively set a preference', then?
Comment 10 Matthew Flaschen 2013-03-29 22:23:46 UTC
I realize more power users use monobook than regular users do.  However, if default were monobook, that would mean only 74 used Vector (unless Vector was the blank row too).

No, I don't think we should ignore users who have not set a preference.  Maybe they like the default preferences (more likely the more editing they do), maybe they don't know there's a choice.  Regardless, I'd just like to see stats on what skins active editors are actually using.

Also, 0 is apparently also default (again, Vector), so that should also be combined in.  See https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions .
Comment 11 Oliver Keyes 2013-03-29 22:27:59 UTC
Sure; see 'I'm pretty sure it's vector' :). Is this a query you expect to be consistently rerunning? (or, to put it in other words: is there value in Analysis and others spending time filling an already-completed query with CASE WHENs, as opposed to spending two minutes in LibreOffice Calc merging cells?)
Comment 12 Matthew Flaschen 2013-03-29 22:31:16 UTC
Yeah, I saw where you said it was Vector.

I do expect people will want to re-run this (and run it on other wikis).  That doesn't mean the query needs to be improved right now, though.
Comment 13 Daniel Friesen 2013-03-29 22:44:48 UTC
If you adapt that query into a maintenance script that doesn't try cleaning up values inside the SQL. You can use the skin methods to merge stuff together the way MW will do it.

- Create an array to store counts in
- For each of the rows returned by that query:
-- Run the 'skin' value through Skin::normalizeKey to get the real skin name to use as an array key.
-- In the counts array increment the value associated with the key matching the real skin name (starting from 0 if the key is not defined).
- Now you'll have a counts array with normalized skin names.
Comment 14 Oliver Keyes 2013-03-29 22:46:18 UTC
It's worth noting that Chad is soon to run a maintenance script that scrubs old up_value possibilities from skins. This should simplify the output and make it more obviously correspond to actual skins rather than pointers to them.
Comment 15 MZMcBride 2013-03-30 03:39:07 UTC
(In reply to comment #14)
> It's worth noting that Chad is soon to run a maintenance script that scrubs
> old up_value possibilities from skins. This should simplify the output and make
> it more obviously correspond to actual skins rather than pointers to them.

That'd be nice. Is this being tracked in Bugzilla somewhere?

[[Wikipedia:Database reports/User preferences#Skin]] has been messy since it was created. It'd be great to see it cleaned up. :-)
Comment 16 Oliver Keyes 2013-03-30 07:53:55 UTC
Not to my knowledge; it was one of those requests that came about via "this table is disgustingly inconsistent" "I'll fix it" "thanks!" conversations. I may be misremembering on the BZ front, however.
Comment 17 Oliver Keyes 2013-03-31 18:18:35 UTC
Removing the URL; this query is unrelated to those statistics (which are based on global usage, rather than local usage)
Comment 18 MZMcBride 2013-08-13 04:41:00 UTC
(In reply to comment #16)
> Not to my knowledge; it was one of those requests that came about via "this
> table is disgustingly inconsistent" "I'll fix it" "thanks!" conversations. I
> may be misremembering on the BZ front, however.

Filed as bug 52778.
Comment 19 Diederik van Liere 2013-08-13 18:10:09 UTC
So should we close this bug and continue with 52778?
Comment 20 Matthew Flaschen 2013-08-14 18:32:56 UTC
Well, this one is about showing readable results with the current database.  Bug 52778 is about removing cruft from the database.

There's some overlap, but even after bug 52778 is fixed, at least one piece of canonicalization will be needed here.  That is combining 'no preference set' and DefaultSkinName (currently 'Vector') into DefaultSkinName.
Comment 21 Matthew Flaschen 2013-08-14 18:35:25 UTC
It might be useful to have one version showing 'no preference set' broken out separately, and another combining it as stated in my last comment.  The latter shows the skins effectively being used.
Comment 22 Toby Negrin 2014-04-21 18:43:21 UTC
This bug is a few months old --
Comment 23 Jared Zimmerman (WMF) 2014-05-15 19:28:45 UTC
(In reply to Matthew Flaschen from comment #1)
> I left one part out:
> 
> Five or more edits to the main namespace *in the last month*
> 
> The goal is to answer the question for active editors.


Matt F did you mean to have this block 44448? or was that a mistype?
Comment 24 Matthew Flaschen 2014-05-16 20:10:05 UTC
Yes, see https://bugzilla.wikimedia.org/show_bug.cgi?id=44448#c13 .

However, although this query could still be improved (i.e. just put the effective skin name, don't make readers of the data think about '', 'default', and '0'), the data above is enough to make it no longer a blocker.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links