Jump to content

User:Iritscen/PageCountAudit: Difference between revisions

re-auditing now that article-count method has been changed, it looks like we have a winner!
m (wording)
(re-auditing now that article-count method has been changed, it looks like we have a winner!)
Line 6: Line 6:
MW code says: Simply count all entries in page table.
MW code says: Simply count all entries in page table.


Iritscen says: Though problematic in the past, this magic word now matches the grand total (see below) of all PAGESINNS counts, including files and redirects.
Iritscen says: Though problematic in the past, this magic word now matches the grand total (see below) of all PAGESINNS counts, including files and redirects. However, we don't really want to display that catch-all number on our main page.


'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}
'''NUMBEROFARTICLES''': {{NUMBEROFARTICLES}}
Line 12: Line 12:
MW code says: From MW 1.18 on, if the count method global is set to 'link', the software gets a distinct count of the entries in the pagelinks table, "pl_from" field, that match those page ids. In other words, it filters out pages that do not link to other pages (the reasoning presumably being that "those aren't real wiki pages" if they're not connecting to anything else). It also filters out redirects. If the method is set to 'comma', it counts all non-blank pages (yes, really).
MW code says: From MW 1.18 on, if the count method global is set to 'link', the software gets a distinct count of the entries in the pagelinks table, "pl_from" field, that match those page ids. In other words, it filters out pages that do not link to other pages (the reasoning presumably being that "those aren't real wiki pages" if they're not connecting to anything else). It also filters out redirects. If the method is set to 'comma', it counts all non-blank pages (yes, really).


Iritscen says: What is $wgContentNamespaces set to these days? Is $wgArticleCountMethod set to 'link' or 'comma'?
Iritscen says: Okay, $wgArticleCountMethod has now been set to 'comma'.


'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for each namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirect pages, that means that PAGESINNS does too. Therefore, we can't use a straight sum of PAGESINNS results as our page count. See final section for the adjusted number.
'''PAGESINNS''', AKA PAGESINNAMESPACE: These counts agree with the number of pages displayed for each namespace on the [[Special:AllPages]] page, which provides some much-needed verifiability. However, since Allpages counts redirect pages, that means that PAGESINNS does too. Therefore, we can't use a straight sum of PAGESINNS results as our page count. See final section for the adjusted number.
Line 49: Line 49:


'''All talkspaces''' totalled using PAGESINNS: {{#expr:{{PAGESINNS:1}}+{{PAGESINNS:3}}+{{PAGESINNS:5}}+{{PAGESINNS:9}}+{{PAGESINNS:11}}+{{PAGESINNS:13}}+{{PAGESINNS:15}}+{{PAGESINNS:101}}+{{PAGESINNS:103}}+{{PAGESINNS:105}}+{{PAGESINNS:109}}+{{PAGESINNS:111}}}}
'''All talkspaces''' totalled using PAGESINNS: {{#expr:{{PAGESINNS:1}}+{{PAGESINNS:3}}+{{PAGESINNS:5}}+{{PAGESINNS:9}}+{{PAGESINNS:11}}+{{PAGESINNS:13}}+{{PAGESINNS:15}}+{{PAGESINNS:101}}+{{PAGESINNS:103}}+{{PAGESINNS:105}}+{{PAGESINNS:109}}+{{PAGESINNS:111}}}}
'''All contentspaces''' (as currently defined in $wgContentNamespaces = {0, 2, 100, 102, 104, 108, 110}) totalled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}}}


The '''grand total''' for all namespaces (including File) is: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:1}}+{{PAGESINNS:2}}+{{PAGESINNS:3}}+{{PAGESINNS:4}}+{{PAGESINNS:5}}+{{formatnum:{{PAGESINNS:6}}|R}}+{{PAGESINNS:7}}+{{PAGESINNS:8}}+{{PAGESINNS:9}}+{{PAGESINNS:10}}+{{PAGESINNS:11}}+{{PAGESINNS:12}}+{{PAGESINNS:13}}+{{PAGESINNS:14}}+{{PAGESINNS:15}}+{{PAGESINNS:100}}+{{PAGESINNS:101}}+{{PAGESINNS:102}}+{{PAGESINNS:103}}+{{PAGESINNS:104}}+{{PAGESINNS:105}}+{{PAGESINNS:108}}+{{PAGESINNS:109}}+{{PAGESINNS:110}}+{{PAGESINNS:111}}}}
The '''grand total''' for all namespaces (including File) is: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:1}}+{{PAGESINNS:2}}+{{PAGESINNS:3}}+{{PAGESINNS:4}}+{{PAGESINNS:5}}+{{formatnum:{{PAGESINNS:6}}|R}}+{{PAGESINNS:7}}+{{PAGESINNS:8}}+{{PAGESINNS:9}}+{{PAGESINNS:10}}+{{PAGESINNS:11}}+{{PAGESINNS:12}}+{{PAGESINNS:13}}+{{PAGESINNS:14}}+{{PAGESINNS:15}}+{{PAGESINNS:100}}+{{PAGESINNS:101}}+{{PAGESINNS:102}}+{{PAGESINNS:103}}+{{PAGESINNS:104}}+{{PAGESINNS:105}}+{{PAGESINNS:108}}+{{PAGESINNS:109}}+{{PAGESINNS:110}}+{{PAGESINNS:111}}}}


==Redirects==
==Redirects==
There were 305 redirects as of 3/18/13 according to [[Special:ListRedirects]].
There were 305 redirects as of 4/5/13 according to [[Special:ListRedirects]].


Redirect breakdown:
Redirect breakdown:
*Main:      266
*Main:      267
*Talk:        0
*Talk:        0
*Help:        1
*Help:        1
Line 70: Line 72:
*OniGalore:  3
*OniGalore:  3
*Oni2:        3
*Oni2:        3
*Oni2 talk:  1
*Oni2 talk:  0
*User:        0
*User:        0
*User talk:  0
*User talk:  0
Line 77: Line 79:


==Conclusion==
==Conclusion==
NUMBEROFPAGES is too broad to be useful, and I cannot reconcile NUMBEROFARTICLES with PAGESINNS. On the other hand, PAGESINNS reconciles with AllPages, which makes it verifiable. So we need to get the true count by using PAGESINNS and subtracting redirects (which is unfortunate because the redirect part has to be counted manually).
NUMBEROFPAGES is too broad to be useful, but now that the page-count method is 'comma', I am able to reconcile NUMBEROFARTICLES with PAGESINNS. PAGESINNS in turn reconciles with AllPages, which lists each page onscreen and is thus verifiable by a direct count (which I have done in the past). So to see how the math works out, we can get the directly-verifiable count by using PAGESINNS on all "content" namespaces, and then manually subtracting redirects as counted above.


Namespaces '''Main, User, BSL, OBD, XML, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}}}
Namespaces '''Main, User, BSL, OBD, XML, AE, and Oni2''' totaled using PAGESINNS: {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}}}


'''''True count''''' (above total minus redirects that I've counted in those namespaces): {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}-266-0-2-22-0-5-3}}
Minus redirects that I've counted in those namespaces): {{#expr:{{PAGESINNS:0}}+{{PAGESINNS:2}}+{{PAGESINNS:100}}+{{PAGESINNS:102}}+{{PAGESINNS:104}}+{{PAGESINNS:108}}+{{PAGESINNS:110}}-267-0-2-22-0-5-3}}
 
At the time of this writing (4/5/13), my personal total is only one higher than the value returned by NUMBEROFARTICLES. That one page could even be the rogue [[AE:AddCharClass]] page, which in some places shows as deleted and in others is still present. But certainly an error of 1 is more than acceptable.  So it looks like NUMBEROFARTICLES is reliable!