Rgbstock forum

forum > Technical questions > Statistics

Statistics

1. ColinBrough7 June 2012, 0:16 GMT +02:00

This probably reveals something of my own conceit, but I have fun collecting statistics on how many of my photos are downloaded each day. I've written a clumsy script to grab my photomanagement page and parse the HTML that is returned for the information I want; my script then records the number of photos currently published and downloaded against the date, so I can plot graphs... I know, slightly sad....

I haven't bothered here yet, partly because the numbers of photos being downloaded is currently comparatively small, but at SXC I grabbed per-photo data and so was able to track how individual photos were "performing". But parsing HTML is clumsy, and prone to error when the page generation code changes...

It got me wondering whether there was a way download stats could be presented to contributors in a flexible way, perhaps so they could generate their own graphs or whatever. And without putting much strain on the site either... (ie less load than a script page-crawling through multiple images, say)

Just thinking out loud...

C

2. Gramps7 June 2012, 13:41 GMT +02:00

Yup...........slightly sad....
Now where did you say the script was? :0)

3. ColinBrough7 June 2012, 14:34 GMT +02:00

LOL!

http://www.colinbrough.pwp.blueyonder.co.uk/count_rgbdownloads
http://www.colinbrough.pwp.blueyonder.co.uk/count_downloads (for SXC)

These run on my Ubuntu install, and depend on 'wget' to grab pages, 'cookies-sql2text' to generate a cookies file (to allow the script to use my login), and then 'sed', 'grep', 'tail' to process the HTML that comes back. The information is saved in files locally, all in simple formats of my own design. (I use the 'rcs' tools - 'co' and 'ci' to store past versions of the files in case the script breaks things.)

http://www.colinbrough.pwp.blueyonder.co.uk/DownloadLog contains the data I've collected for my photos here - first column is obviously a date; second column is total number of downloads, and third column is the number of my photos then uploaded...

I post-process with 'gnuplot' to draw graphs...

4. jazza7 June 2012, 23:02 GMT +02:00

I Love your script Colin :)
How do you think we import a SXC gallery......

Most of the statistic information is available but at the moment we only provide this simple page: http://www.rgbstock.com/recent

Maybe it is a good idea to create a statistics page per user. I will think about it.

5. lennie8 June 2012, 0:48 GMT +02:00

That's was a great idea to make a script like that.

I think might have even learned some new shell script tricks ;-)

6. ColinBrough8 June 2012, 17:52 GMT +02:00

Just since its been of interest, here are the kinds of graphs I can generate from the data collected by the above scripts:

http://www.colinbrough.pwp.blueyonder.co.uk/RGB1.gif
http://www.colinbrough.pwp.blueyonder.co.uk/SXC1.gif

The RGBstock graph only has total number of shots downloaded and number of photos online against date. The SXC graph I chose has the downloads for my top 45 photos at SXC - the implementation is poor, so the colour of the line changes as one photo "overtakes" another...

7. xymonau10 June 2012, 8:37 GMT +02:00

I wish you people would speak simple English... LOL!

8. jazza11 June 2012, 9:41 GMT +02:00

I am sorry. I wished I could speak better English ;)

The graphs looks good Colin, well done.

Please sign in or sign up if you want to participate in the forum discussions.

 
 
x
name
country
photos
downloads
camera
 
Lightbox . 常问问题 . 接触 . 许可协议 . 使用条款 . about . www.hqstock.com free stock photos totally free stock photos stock photos high quality free stock photos totally free stock photos totally free stock photos totally free stock images free stock images editors' pick alternative to sxc.hu Rgbstock blog and news
| English | Deutsch | Español | Polski | Português | Nederlands |
Shutterstock official partner of Rgbstock Saqurai AI official partner of Rgbstock