14

Anecdotally, I've noticed that a few tags on a site I frequently visit tend to be associated with questions that are off-topic (e.g., > 70% of questions with that tag have been closed).

Is there a systematic way to find such tags? For instance, is there a way to find all tags where most questions with that tag have been closed? Or, a way to find all tags where most questions with that tag have a total vote score that is negative? I can't figure out how to do this using search, but maybe there's some clever way to do it with SEDE.

Motivation: I want to identify tags that could most benefit from having a tag wiki excerpt that provides clearer guidance on the site's expectations. If I notice that most questions with that tag have been closed, I can then write a tag wiki excerpt that clarifies our policy and scope. But is there a way to find such tags in the first place?

Related: Tags with high frequency of off-topic/wrong-site questions asks what to do with such tags, but not how to identify them; Prewarn users that question may be off topic based on tags proposes some specific changes to how the site works for such tags, but I'm asking how to identify them, not suggesting any changes to site functioning.

4

I'll answer these questions:

  • Is there a way to find all tags where most questions with that tag have been closed
  • Find all tags where most questions with that tag have a total vote score that is negative

with this query:

select tagname
     , [closed]
     , [total]
     , [negscore] 
     , (cast([closed] as decimal) / total) * 100  as [% closed]
     , (cast([negscore] as decimal) / total) * 100  as [% negative score]
from (
select t.tagname
     , count(*) [closed]
     , sum(case when p.score < 0 then 1 else 0 end) [negscore]
     , t.count [total]
from tags t
inner join posttags pt on  t.id = pt.tagid
inner join posts p on p.id = pt.postid
where exists (select * 
              from  posthistory ph 
              where pt.postid = ph.postid and posthistorytypeid = 10)
and count > 1
group by t.tagname
       , t.count
having count(*) < count

) as data
order by [% closed] desc

Notice that I filtered out tags with just 1 question. Be aware that this query only take non-deleted questions (and therefor tags) into account. The main reason is that the table posttags doesn't include deleted posts. In theory you could go over the rows in the postwithdeleted table for a specific tag if you need stats for the now deleted posts as well.

When run today on Stack Overflow your result will be: SEDE query results

Keep in mind that SEDE is updated once a week, on Sunday.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .