File:Wiktionary Teestube Seitengröße.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 1,536 × 553 pixels, file size: 89 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
Deutsch: Größe der Seite Wiktionary:Teestube in Bytes im Verlaufe der Versionsgeschichte. Stand: 01.09.2014
Date
Source Own work
Author Kronf
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

# python
# -*- coding: utf8 -*-

import urllib2
import json
from datetime import datetime
import matplotlib.pyplot
import matplotlib.dates

page = 'Wiktionary:Teestube'
totalcount = 12000

remcount = totalcount
rvcontinue = ''
revlist = []
while remcount > 0:
    if remcount > 500:
        querycount = 500
        remcount -= querycount
    else:
        querycount = remcount
        remcount = 0
    url = 'http://de.wiktionary.org/w/api.php?action=query&prop=revisions&format=json&rvprop=timestamp|size&rvlimit='+str(querycount)+'&rvdir=older'
    if rvcontinue != '':
        url += '&rvcontinue='+rvcontinue
    url += '&titles='+page
    response = urllib2.urlopen(url)
    rawdata = response.read()
    jsondata = json.loads(rawdata)
    revlist += jsondata['query']['pages'].values()[0]['revisions']
    try:
        rvcontinue = str(jsondata['query-continue']['revisions']['rvcontinue'])
    except:
        print 'Page history is complete.'
        break

timestructs = []
size = []

for rev in revlist:
    timestruct = datetime.strptime(rev['timestamp'],"%Y-%m-%dT%H:%M:%SZ")
    timestructs.append(timestruct)
    size.append(rev['size'])

dates = matplotlib.dates.date2num(timestructs)
matplotlib.pyplot.plot_date(dates,size,'b-')
matplotlib.pyplot.tight_layout()
matplotlib.pyplot.show()

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:34, 1 September 2014Thumbnail for version as of 11:34, 1 September 20141,536 × 553 (89 KB)Kronf (talk | contribs)complete page history; update
20:08, 27 August 2014Thumbnail for version as of 20:08, 27 August 20141,536 × 553 (82 KB)Kronf (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata