File:Wiktionary Wunschliste Seitengröße.svg

Summary

Description
Deutsch: Größe der Seite Wiktionary:Wunschliste in Bytes im Verlaufe der Versionsgeschichte. Stand: 01.09.2014
Date
Source Own work
Author Kronf
SVG development
InfoField
Source code
InfoField

Python code

Page size
# python
# -*- coding: utf8 -*-

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

page = 'Wiktionary:Wunschliste'
totalcount = 30000

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

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
Category:License migration redundant#Wiktionary%20Wunschliste%20Seitengröße.svgCategory:GFDL#Wiktionary%20Wunschliste%20Seitengröße.svg
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic 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.
Category:CC-BY-SA-3.0,2.5,2.0,1.0#Wiktionary%20Wunschliste%20Seitengröße.svg
You may select the license of your choice.
Category:Self-published work
Category:Wiktionary statistics
Category:CC-BY-SA-3.0,2.5,2.0,1.0 Category:GFDL Category:License migration redundant Category:Self-published work Category:Valid SVG created with Matplotlib code Category:Wiktionary statistics