Hallo,
I find the idea great, to get some more out of the collected statistic.
GD2 is included in PHP and used by drupal. You mentioned, you would use SVG - but this needs a plugin or a rendering package for php gd2 (but I couldn't find one up to now).
I have played around with jpgraph (http://www.aditus.nu/jpgraph/) and got some results, you may see in the attached version of the module.
To see the quick hack and to try it use "admin/logs/hours", after you have installed xstatistics.
(If you aready have installed it, you have to copy the files, and then decativate and reactivate the module to see the links).
Some ideas/features for commenting on:
- Does anyone know some other statistic libraries for php?
- drupal is a realy great cms framework, and should use it's internal collected statistics also to organize the content or to give the user some useful suggestions based on it.
- Some statistics could be used to offer the admin a new optimized menu structure, based on the analysis done with the collected statistics.
- There are a lot of tools out there, but it would be great to have that logik based on the stats in drupal.
- Graphical representation of the statistics could show you patterns, that you can use to rearange your web site.
thx, willi
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | xstatistics_0.zip | 311.82 KB | willi.firulais |
| #4 | xstatistics.zip | 311.59 KB | willi.firulais |
Comments
Comment #1
willi.firulais commentedComment #2
willi.firulais commentedComment #3
willi.firulais commentedTry to upload the example code
Comment #4
willi.firulais commentedComment #5
willi.firulais commentedSlightly correted version.
Comment #6
Bèr Kessels commentedHi,
In general i like this. But...
* Please mind your code style. This looks very drafty with lots of pieces commented.
* Use english comments, use doxygen comments and dont use separators // ----
* Please dont use functions like _image_.,.. they will conflict with image module.
* We dont ship 3rd party code in a module, so we need docs on how to imstall jgraph
* We dont want to force people to use this 3rd party thing. it should be optional. xstatistics.module should detect when the lib is there and then use it,
And we realy want to generate these graphs in a cron run :)
Which is why i really prefer svg. Moz will support this (again) in some next version, konqueror and safari already support it. And indeed, IE needs a plugin, but frankly: i dont care :)
Comment #7
willi.firulais commentedHallo,
Thx for your feedback. This post was not a code to plug into the cvs - this was just written in the sense of a draft/sketch/rough drawing of how to enhance to xstatistics module. I just want to place an enhancement request here.
Wish you some luck with your SVG implementation.
Thx, Willi
Comment #8
Ian Ward commentedHi Ber and Willi and anyone else,
Has anyone done any more work on getting jpgraph going with xstatistics? If you've played with the views module, I'm imagining a jpgraph module that will let admins build graphs from data, arguements, and filters made available much like it is done with the views module. In a sentence - views module is like a GUI for building queries for node/other views based on arguements and filters. I'd like to make a module that works like the views module administratively, but instead of a GUI for building node/other views, it would be a GUI for building graphs made by jpgraph.
You could select what type of graph, stylistic elements, axis variables, etc., and include arguements for time constraints, taxonomy vocabs/terms, users, etc.
Thoughts?
Ian
Comment #9
Bèr Kessels commented1) the current implementation of jpgraph is bad. Its a Proof of concept, nothing more
2) JPgraph is VERY heavy. very. Meaning that having this included requires people to change the memory limit, only to run this module!
3) I have other plans for xstatistics and views. Watch the logs
4) I personally beleive in SVG for this much more. Its lighter and FF 1.5 supports it too now. Its not hard to simply hide the graphs for IE without the svg plugins. All other modern clients have SVG support.
Bèr
Comment #10
simeInteresting, a good experiment. I have my eye on this subject. I kind of like the idea of SVG for the same reasons as Ber, and it will be interesting to see how fast support for SVG is implemented.
Comment #11
Bèr Kessels commentedComment #12
simeHow time passes...
I thought I'd leave a link to an example to interest people who might have some time. Use FF to view:
http://www.w3.org/TR/SVG/images/shapes/rect01.svg
Look at the page source.
I'm just daydreaming here. The first step would be a php->svg engine? Or should this be done in jQuery? Hmm. This definitely needs to be a category in the next SOC.
Comment #13
willi.firulais commentedSome interresting flash tool I found here: http://www.maani.us/xml_charts/index.php
Comment #14
simeI wonder how standard that XML is, and whether most of the tools are already in Drupal to generate it.
I wonder if that XML would be just as suitable as input to a javascript parser, that would then create the SVG.
Comment #15
Bèr Kessels commentedSVG is a standard, Flash is not, hence I won't put any flash in there.
I did some proof of concept work a year ago: create SVG with PHP. Its dead easy. But chose against further development at that time, because safari and Konqueror were the only browsers with OOTB SVG support. Now tha t FF joined the crew, I think the userbase is large enough.
Some of my bookmarks, for reference:
* detect SVG capabilities: http://blog.codedread.com/archives/2005/06/21/detecting-svg-viewer-capab...
* AJAX/JS and PHP SVG charting: http://cristian.nexcess.net/ajax/svg_chart/
* The lib I used (code from) in my proof of concept: http://www.phpclasses.org/browse/package/2184.html
I searched my archives but could not find my PHP code for that POC again. pity :(.
Comment #16
simeI've created this group to open up discussions.
http://groups.drupal.org/graphing-svg
Taking the liberty of closing this ticket, since the groups forum is probably better for chewing the fat over this.
Comment #17
willi.firulais commented"SVG is a standard, Flash is not, hence I won't put any flash in there. "
This statement may be interresting for you:
“Please note that Adobe has announced that it will discontinue support for Adobe SVG Viewer on January 1, 2009.”
[http://www.adobe.com/svg/viewer/install/]
Hope you have been successful with your module.