Archive for April, 2009

Web Statistics: Flickr Stats & Google Analytics

Keeping track of the number of visitors to a site -or collecting data about how these visitors found your site- can be useful for several reasons: evaluating, reporting, planning etc.  After uploading two image collections into flickr -January 2009-, I’ve been checking/comparing two web-stats tools -Google Analytics (GA) for the local CONTENTdm collections and Flickr Stats (FS) for the new flickr collection.

At first, flickr seemed to be the “winner” especially with the level of details (e.g. views, comments, referrers, keywords) provided for individual images.  At that time, there was also a way to view the “all time” stats.  In March, however, flickr made a couple of changes to the stats page.  They added the “so far today” feature which could be useful but they disabled the “all time” stats.  You can read some details and discussion on this page.

…being positive, I hope to see this feature -restored- in the future, because it lets users see/analyze/make decisions based on the accumulated stats.  Even better, FS should let users specify a range of time–just as GA does.

For instance, think about this hypothetical example:
web-stats-question
[ view larger image ]

While we cannot really compare these two tools, in the long-term, flickr users will probably appreciate some other enhancements -generate a PDF report, visitors’ location, etc.  After all, FS is part of the $25 annual fee for the pro accounts.

In the meantime, don’t get disappointed …we can still do something:
www.flickr.com/photos/me/stats/refs/thisweek/
www.flickr.com/photos/me/stats/refs/lastweek/
www.flickr.com/photos/me/stats/refs/threeweeksago/
www.flickr.com/photos/me/stats/allphotos/thisweek/
www.flickr.com/photos/me/stats/allphotos/today/
www.flickr.com/photos/me/stats/YYYY-MM-DD/
www.flickr.com/photos/me/stats/YYYY-MM-DD/refs/
www.flickr.com/photos/me/stats/YYYY-MM-DD/allphotos/

No Comments »

Converting Word to FlashPaper files (doc>swf)

Why FlashPaper and not PDF? …well, as someone said it “sometimes we just need a simple way to display/share documents on the web … without waiting for a separate reader”. You may want to check this page, which provides an overview of some of the FlashPaper benefits.

Anyway, last year (April 2008) we added a set of transcript files (.swf) in a manuscript collection. To do that, we had to install the Macromedia plug-in, and it worked fine for single files; however, we needed to convert more than 200 files. Of course we could have done it one-by-one …but NO -too many clicks. Instead, we used a combination of MS-DOS and PHP code to batch convert *.doc to *.swf files.

Here is how:
1. created a DOS batch file (convert.bat) and added one line of code:

    for %%a in (*.doc) do call
    C:\PROGRA~1\MACROM~1\FLASHP~1\FlashPrinter.exe
    %%a -o %%a.swf %%a

This .bat file reads all the *.doc files in a directory, for every *.doc file, it calls the FlashPrinter.exe file and creates the new *.swf file

file01.doc > file.01.doc.swf

In other words, it worked but it kept three unnecessary characters “doc” in the new filename.

2. To fix this, …had to re-use an existing PHP script for renaming filenames and done!

<?
$dir = "/source_folder/";
if ($dir_list = opendir($dir)) {
    while (($filename = readdir($dir_list)) !== false) {
        if ($filename=="." || $filename=="..")
        continue;
        $new = ereg_replace('.doc.', '.', $filename);
        $old_file = $dir . $filename;
        $new_file = $dir . $new;
        rename("$old_file", "$new_file");
        }
    }
echo "done!\n";
?>

Why MS-DOS for the doc>swf conversion?, because I couldn’t get the exec() or passthru() PHP functions to work :(

Why PHP for renaming the files?, because I had a script already in place.

Why this entry now? because I recently learned that we’ll be using the same format for the transcripts of an Oral History Project.

In case you’re interested in some more MS-DOS tricks, here is a useful page.

No Comments »