Lending paths

Whilst working on Pewbot, I wondered if you could really predict the future borrowing pattern of a user based on a specific book — in other words, if they borrow book X will they then go on to borrow book Y and then book Z?
Anyway, I’ve knocked together a basic script that will extrapolate the most likely lending path (both past and future) for a specific book.
For example, here’s the lending path for “Learning SQL: a step by step guide using Oracle”:
http://library.hud.ac.uk/perl/lendingpath/bib.pl?418925
The book in question is displayed in bold. The title directly before it (“Java: the first semester”) is the title that is most frequently borrowed prior to “Learning SQL”, and the one directly after (“Database systems: a practical approach to design…”) is the most likely to be borrowed subsequently.
In turn, I then continue to extrapolate the paths in either direction until I run out of data or a title gets duplicated.
What we end up with is a hypothetical path showing what someone is most likely to have borrowed previously, and will then go on to borrow in the future.
What’s interesting is the flow of subjects along the path — the books before are all IT books, but the future path flows into HCI, IT management, and then into corporate strategy and business titles.
If you click on a book title, then it’ll take you though to the OPAC. If you click on the “path” link, then you’ll see the lending path for that particular title.
Once you’re in the OPAC, there’s a link to the lending path at the foot of every full bib page (although the path can only be generated if there’s enough raw circulation data).
If nothing else, it proves that our students are sensible enough to borrow the Harry Potter books in the correct order! 😀

Extended info from "pewbot"

LibraryThing‘s Tim Spalding has been in touch with me and he made some suggestions that I’ve now added into pewbot.
If you pop /extended onto the end of a request, then pewbot will return a richer set of information – e.g.:
http://webcat.hud.ac.uk:4128/pewbot/0750603054/extended/
The attributes returned for each ISBN are:

  • count
    the number of borrowers who borrowed both books
  • totalDays
    the total number of days that elapsed been each item being borrowed by all the borrowers
  • sumDays
    the sum of days, taking into account loans before and after
  • ckoBefore
    the number of borrowers who borrowed the second item first
  • ckoSame
    the number of borrowers who borrowed the second item at the same time
  • ckoAfter
    the number of borrowers who borrowed the second item afterwards

Continue reading “Extended info from "pewbot"”

book suggestions from "pewbot"

I’ve put together my first hack using pewbot — suggestions based on an individual’s loan history.
By running a user’s loan history against the “also borrowed” database, it’s possible to build a list of titles that should be of interest to that borrower.
For example, if a student had borrowed the following 4 IT books:

     

…then the top 10 suggestions are:

     

     

 

Continue reading “book suggestions from "pewbot"”