3D graphics - web site usage - simple matplotlib and python example
Some very interesting graphs from our server log data, courtesy of Python, numpy and matplotlib. Truly, a picture paints a thousand words. The data in the first and last diagrams is raw - showing exact number of hits per hour; in other diagrams I have used proximity smoothing which makes the trends very much easier to spot amongst lessened noise, but eliminates a peak late in the evening of day 10 which I am going away to investigate when I have posted ;-)
The source code of this example is [here]
- the data is unpublished, as it comprises some 24 files of between 20mb and 44 Mb each - an illustration of how powerful a Python tool can be.
Update ... added the next morning
I've looked at that late evening spike on 28th September, and it turned out to be some bloke (or blokes) from Almere in Netherlands who looked at just under 20 pages on our site and decided we were so good he would mirror the rest. An automated program, but one claiming to be IE5, was used. He did
check robots.txt - but he went for as many pages as he could as fast as he could and caused the spike which caused a noticeable blip on the graphic, with 4416 requests between 10 and 11 pm when the site would otherwise have been quite quiet. The shape of the spike is further explained by 2419 requests in the following hour.
I doubt whether this user would have caused a problem to others even if he had gone "full tilt" as he would probably have been limited by his bandwidth, but it was a good test of our "governor value" which duely kicked into action. (written 2010-10-12, updated 2010-10-13)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesY118 - Python - numpy, scipy and matplotlib 
Learning more about our web site - and learning how to learn about yours - (2011-12-17) 
Arrays v Lists - what is the difference, why use one or the other - (2010-10-10) 
Matplotlib - graphing in Python - teaching examples - (2010-10-10) 
Loading and saving data - Python / numpy - (2010-10-09) 
What are numpy and scipy? - (2010-10-09)
Some other Articles
How will we present courses over the coming years?Looking forward - the next 30002999 - looking backUsing an exception to initialise a static variable in a Python function / method3D graphics - web site usage - simple matplotlib and python exampleCopying - duplicating data, or just adding a name? Perl and Python comparedA river in Melksham is not just for boaters.Python - some common questions answered in code examples
4208 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85 at 50 posts per page
This is a page archived from The Horse's Mouth at
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).