Wikipedia:WikiProject Military history/Orphans

The goal of this page is to provide some data about unlinked articles (WP:Orphans) or poorly-linked articles in the Military history project.

De-orphaning articles is an important aspect of building the web. Editors also sometimes use the term orphan to refer to pages that do not have as many incoming links as they ought to, even if they do not meet the technical definition for orphan status. For information on orphans and suggestions on how to de-orphan, see WP:Orphan and Wikipedia:WikiProject Orphanage.

Trends for orphans and one-link articles are as follows:
Note: Sample graph only; all data below are fake, except the two 'April' datapoints, which are real.


Backlog!


Additional datapoints will be added to the graph over time, and the graph will mature into a real trends graph.

Rough approximation

A rough approximation of the number and list of orphan articles in Military history can be found with this advanced search:

  • articletopic:military-and-warfare incategory:"All orphaned articles"

This is an approximation based on categories, and may have false positives or negatives. For example, the very first article on the search result page, Murder of Anastasiya Meshcheryakova, does not appear in the § Orphan list below, and checking further shows that in fact, it has three inlinks. The main advantage is that the advanced search returns results immediately; the raw database query takes around seven minutes, and needs post-processing in order to display the results in a user-friendly way on this page, but is more accurate.

Orphans and poorly linked articles

RAQ Query 63580 was created in order to provide a summary of the number of orphans in MILHIST; that is, the list of articles having no in-links from other articles, or few in-links. At this writing, there are 1,540 orphans.[a] This value is found in the first row of the result set of query 63580. The next ten rows list the number of articles with one in-link, two in-links, and so on, up to ten in-links.

Summary counts

Here is the summary section of the results. The value in column two, is the count of articles which belong to WikiProject Military history, which have the number of in-links from mainspace articles displayed in column one. So, for example: there are 1,541 orphans, and 5,588 articles with exactly one in-link.

inlinks count
0 1541
1 5588
2 8008
3 9123
4 8892
5 7758
6 6826
7 6041
8 5158
9 4549
10 4104

The following sections show the detailed list of articles corresponding to the first two rows of the summary table. So, the next section contains a table with 1,541 data rows, and the following one has 5,588 data rows.

Orphan list

Update procedure

You will need:

  • a registered account
  • logged in to Wikimedia (use your WP account)
  • a computer where you can save files
  • optionally, an ability to run regex commands against the files, if de-duping of redirects is required

Procedure:

Note: a newer query that updates 63580 to exclude redirects[b] will be an improvement, and make the de-dupe/regex step below unnecessary
  • run a copy of Quarry query 63580; (note: it takes about 7 minutes to complete.)
    • Tip: as you can only run queries you created, you'll need to log in to Quarry, fork query 63580 to get a copy of your own, and run that.
  • export the result using type = 'wikitable'
  • split off the summary part (first 24 rows, through '|10||(Total)|| NNNN') into file 'summary', and add line '|}' at the end.
  • save the remainder as file 'detail'.
  • if the db query doesn't de-dupe redirects that match the article title, run this regex against the detail file:
    • s!^\|(\d\d?)\|\|([^\|]+)\|\|(?:\2)\|?!|\1||\2||!g[c]
  • Find the orphans (rows with '0' in column one) in the detail file, and export them to another file 'orphans':
    • m!^\|0\|\|.*?$
  • In the 'orphans' file, insert wikitable row marker |- on a line by itself before every line.
  • Add wikitable header line(s) and footer as needed. Suggested header for 'orphans' file:
{| class="wikitable"
|+ Orphans extracted YYYY-MM-DD from quarry:63580, with linked articles and de-duped redirects
! inlinks !! title !! (not counting these redirects)
  • Table footer is '|}' as the last line of the file, on a line by itself.

See also

Improvements and suggestions

Make the table into a worksheet for de-orphaning:

  • Add a column where a checkmark or other icon could be added, to show which ones are done: checked boxunchecked boxX'ed boxcheckY
  • Maybe a "remarks" column, for comments
  • Add a column with a link to an advanced search for that title; unlinked text may already exist for the article title

Notes and references

  1. ^ "1,540 orphans": as of 2022-04-02.
  2. ^ Probably need to add AND inlinkpage.page_is_redirect = 0 to the left join?
  3. ^ Regex needs update; this only de-dupes if the redirect is the only one present, or if it's the first in a list of several pipe-separated redirects, but not if it's the second or subsequent redirect.