Joy of Statistics…or How I Spent My Friday

We have 173 saved reports in Koha.  That’s a lot.  How many are current? How many are still used? How many even work?  I haven’t a clue.  Regardless, I added  a few more yesterday when I went to visit Basehor.  As a District Library that has to take any mil levy increase to the tax payers for a vote, it’s important for them to have a useful strategic plan and meaningful statistics to prove that they’re reaching their goals.  That’s what I was doing yesterday – trying to figure out how to get 2009 Circ Stats out of the catalog that met their needs AND could be run without getting a Gateway Timeout error!  The Circulation Wizard is bunk – wasn’t before we added 7 new libraries, but now I guess we’ve reached the wizard’s carrying capacity and it’s feet up except early in the morning or late in the evening.  Not terribly useful…but our support vendor is working on it, I think (hope and pray).

Here’s what we came up with – we search the Statistics table for items issued and renewed at their location that have call numbers LIKE ‘insert example here%’ – we made judicious use of OR statements (thank you #kohakansas for your help with that) and the % wildcard character.

We did discover that because Basehor has a unique call number scheme of DVF for their movies, our report was not counting many movies circed at their branch that came from other libraries.  We debated and decided that for what they need – proof that their adult media goal is being met – the missing circs wouldn’t matter.  It was a lively debate and I really enjoyed it.  Carla certainly has a strong team at their library and encourages everyone to voice their opinion.

I may add these to the SQL library.  Will be asking folks tomorrow for help with adding a date range – need to run this for the first quarter of 2009 and I can’t whip out the code for that…

SELECT count(*) FROM statistics
LEFT JOIN items on (items.itemnumber = statistics.itemnumber)
LEFT JOIN biblioitems on (biblioitems.biblioitemnumber = items.biblioitemnumber)
WHERE statistics.type IN (‘issue’, ‘renew’) AND YEAR(datetime) = ‘2009’
AND statistics.branch = ‘BASEHOR’ AND items.itemcallnumber LIKE ‘DVF%’
OR statistics.type IN (‘issue’, ‘renew’) AND YEAR(datetime) = ‘2009’
AND statistics.branch = ‘BASEHOR’ AND items.itemcallnumber LIKE ‘CD F%’
OR statistics.type IN (‘issue’, ‘renew’) AND YEAR(datetime) = ‘2009’
AND statistics.branch = ‘BASEHOR’ AND items.itemcallnumber LIKE ‘CDF%’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s