Jump to content
Wikimedia Meta-Wiki

Wikistats/archive: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
Line 13: Line 13:
You will need:
You will need:


* Perl version 5.6 or (削除) higher (削除ここまで)
* Perl version 5.6 or (追記) later (追記ここまで)
* [[en:Ploticus|Ploticus]]
* [[en:Ploticus|Ploticus]]
* MediaWiki 1.5 or later (for the <code>dumpBackup.php</code> script)


Here are the (admittedly hacky) steps to generate the statistics. This is known to work on [[en:FreeBSD|FreeBSD]] at least.
Here are the (admittedly hacky) steps to generate the statistics. This is known to work on [[en:FreeBSD|FreeBSD]] at least.

Revision as of 17:08, 2 March 2006

Wikistats is a set of Perl scripts used to generate detailed statistics for Wikimedia projects. These statistics are available at stats.wikimedia.org. Erik Zachte is the author of the scripts, and he is also responsible for running them and posting the results. All statistics are produced by analyzing the database dumps, which are usually created monthly.

See Wikistats csv for information on accessing statistics in comma-separated values (CSV) format.

Source code

The scripts can be found here: http://stats.wikimedia.org/scripts.zip

Running Wikistats on your own MediaWiki site

The scripts have not yet been packaged for general consumption, but they can be made to work on any MediaWiki site without too much trouble.

You will need:

  • Perl version 5.6 or later
  • Ploticus
  • MediaWiki 1.5 or later (for the dumpBackup.php script)

Here are the (admittedly hacky) steps to generate the statistics. This is known to work on FreeBSD at least.

  1. Create a new directory and unzip the scripts there
    • Note that the script files are in DOS text format. If you are on Unix, you should convert them to Unix format.
    • You might also need to make WikiCounts.pl and WikiReports.pl executable.
  2. Obtain a full XML dump of your MediaWiki data using the dumpBackup.php script as described at MediaWiki#Database_dump
  3. In the directory with the scripts, create these subdirectories:
    • counts
    • dumps
    • dumps/en
    • reports
  4. Use bzip2 to compress the file containing the XML dump, and write the compressed output to:
    • dumps/en/pages_full.xml.bz2
  5. Run this command, where YYYYMMDD is the date the XML dump was taken:
    • WikiCounts.pl -x -i dumps -o counts -l en -d YYYYMMDD
      • This should create a bunch of CSV files in counts
  6. The WikiReportsOutputPlots.pl script is hardcoded to run pl to invoke Ploticus. On some systems (like Unix) the Ploticus executable is named ploticus. If that's the case on your system, edit the script, and change the single occurrence of "pl -" to "ploticus -"
  7. Run this command, using the same YYYYMMDD as above:
    • WikiReports.pl -x -i counts -o reports -l en -d YYYYMMDD
      • This should create a bunch of HTML, PNG, and SVG files in reports/EN
  8. In the reports directory, download these additional files which are referred to by the HTML in the reports/EN directory using a relative ../ path:
  9. Now you should be able to load reports/EN/index.html in a web browser and see the statistics.

AltStyle によって変換されたページ (->オリジナル) /