Since launching our Statistics Dashboard in February, we’ve had a few people ask us “hey, how do you do that?” The answer is simple and/or complicated, depending on your point of view (and your ability to access your raw data).
All of the data represented in the dashboard is gathered by performing SQL queries against a couple different data sources. For all our circulation and collection stats, we’re querying the postgres database powering our Evergreen ILS system. For the rest, we’re querying a postgres database we created to contain a variety of other statistics which are fed by other systems.
Envisionware’s PC Reservation® — the software we use for time management in our computer labs — stores its usage data in an MS Access database which we extract nightly and insert into postgres. For wireless, we parse DHCP logs nightly and insert unique triples (datestamp,ipaddr,mac address) into postgres. For soft stats (questions, in this example) the data is entered by service desk staff using a custom front-end we wrote that integrates with our drupal-based staff portal.
None of that is entirely relevant, as the long story short is, the stats page is generated by a “simple” php script that parses CSV files and displays the data in a readable format, so if you have some way of extracting data to CSV, the method for doing so is not entirely significant.
Because we’re geeky people who find statistics and graphs interesting, we plan to revisit our stats dashboard before the end of 2017 in order to add even more numbers and/or graphs. Examples might include “How many active holds are there right now?”, “What percentage of our videogame collection is currently checked out?”, a coverflow-style feed of recently-returned items and other, more real-time, statistics.
Our Technology department does everything it can to share our code so others can benefit when possible and this is no exception. While we have not yet pushed the scripts to GitHub, we expect to do so “soon”. In the meantime, feel free to contact us with any questions, or if you’d like to see the scripts. We’re always happy when we do something that other people find interesting, so do please let us know.