See what categories new users (& other trust levels) post in most

data-explorer

(Paula Kreuzer) #1

Is there a way to see which categories are most used by users that belong to a certain trust level?
I’d especially be interested in what categories new users are most likely to start a topic in, but also where they post in general as well as how other trust levels behave.
Posts and topics of e.g. regular users from before they ranked up should either not be counted at all or count for prior trust levels.

My theory is that new users are most likely to post (and especially start topics) in categories where you get help with something, whereas regular users will use categories for deep discussions more often.


(Brendan Schlagel) #2

Sounds like a job for the Data Explorer plugin! Very useful, you can learn more about it here:

Here’s a stab at a SQL query that does something like this — it takes trust_level as a parameter, and then returns a sorted list of the # of posts created in each category by users w/ that trust level (disclaimer, I’m a SQL novice, modify as needed!):

-- [params]
-- int :trust_level = 1

WITH topic_categories AS
    (SELECT
        t.id topic_id,
        t.user_id,
        t.created_at,
        t.score,
        c.id category_id,
        c.name category_name
    FROM
        topics t
    LEFT JOIN categories c
    ON t.category_id = c.id
    )

SELECT 
    count(tc.*) count,
    tc.category_id
FROM
    users u
LEFT JOIN topic_categories tc
ON u.id = tc.user_id
WHERE 
    tc.created_at IS NOT NULL
    AND tc.category_id IS NOT NULL
    AND u.trust_level = :trust_level
GROUP BY 
    tc.category_id
ORDER BY count DESC

(Gabriel Tonon) #3

That’s something I’d also be very interested in.

Recently I asked a similar question and it seems like out-of-the-box metrics for user interactions are coming soon to the admin dashboard 2.0 :rofl:

Not sure if this specific feature would also be included; perhaps @HAWK might also be able to confirm that.


#4

The dashboard won’t specifically include this data. My challenge is to simplify the dashboard but make it useful for all community types. For instance, CoP CMs need very different data to support community CMs. TL data is of very little (if any) relevance to the latter.

What we are planning as a compromise is to surface approved data explorer queries via the dashboard so that mods have access.

Here is an early mockup: