Visit the library on a rainy day

3 minute read

LibrariesWest are based in Bridgwater, Somerset. One day, while out and about at lunchtime in November it was noticeable that almost no-one was around the High Street. Either outside, or in the shops or cafes. This wasn’t just because it was Bridgwater, it was pouring with rain, and had been for most of the day. This was storm Angus, bringing 80mph winds and flooding to the UK.

How does rainfall affect library usage? Not just on the scale of one library, but for a region? This is assuming the weather in question is significant enough to make a difference - BIG Weather. To look at this data, we need historical library usage data (e.g. issues), and climate data.

Finding climate information is difficult. There is monthly information released by the Met office for many weather stations, but monthly isn’t detailed enough to measure the impact of heavy rain on a single day. There is openly licensed live forecasts available, so in theory these could be collected and then used as historical data. But these are forecasts, they may be the opposite of what actually happened.

Hadley Centre UK Precipitation (HadUKP) is a series of datasets showing rainfall, averaged over areas. The data is released separated by region: Northern Scotland, Eastern Scotland, Southern Scotland, Northern Ireland, North West, North East, Central, South West and Wales, and South East. So it’s not very accurate if you need something localised to a city but for matching with LibrariesWest libraries, the South West region fits OK. See this post on the Geography of LibrariesWest for more info.

HadUKP provide a file for South West England and Wales Daily totals. The data is a plain text file and looks like this:

Daily Southwest England & Wales precipitation (mm). Values may change after QC.
Alexander & Jones (2001, Atmospheric Science Letters).
Format=Year, Month, 1-31 daily precipitation values.
 1931    1   0.60   3.70   3.00   0.40   0.00   0.00   0.00   0.50   0.60   0.60   6.71   0.80   0.00   1.30   1.10   3.30   1.50   3.80   3.90   0.60   9.71  15.01   5.61   1.60   4.40   0.50   5.00   6.51   3.20   2.20  17.42
 1931    2   0.30   1.00   0.00   0.10   6.61   2.31   1.00   7.12  10.02   2.31  10.42   3.51   1.80   3.01   2.71   4.21   3.11   0.10   3.31   3.51   0.40   1.20   0.20   1.60   4.51   3.21  10.22   3.11 -99.99 -99.99 -99.99

The format looks tricky to deal with but it’s not too bad. Ignoring the first 3 lines of text documentation, each line is then a series of values separated by spaces. The first value will always be the year (it starts from 1931), the second the month, and then a value for each day. It always has 31 values for the days. In cases where there aren’t actually 31 days in the month, the value provided is -99.99.

In the LibrariesWest GitHub opendata repository we have a script that will convert this data into a CSV (comma separated values) format. After running that script, the data ends up looking more like this:

Date Precipitation
2016-06-07 0.07
2016-06-08 0.00
2016-06-09 0.43

For the data, see this file on GitHub. We went live with a new Library Management System in June 2016, so for simplicity we’ll only look at data from then.

There will always be differences in usage between different days of the week, due to changing patterns of user behaviour and a different profile of opening hours. So we can only reasonably compare usage where the day of the week is the same. Here is a selection of the data, where we have days of BIG rain compared to the same day of the week with no rain.

Date Day of week Precipitation Issues
2016-11-12 Saturday 1.38 21267
2016-11-13 Sunday 0.17 1656
2016-11-14 Monday 1.76 17041
2016-11-19 Saturday 25.67 20801
2016-11-20 Sunday 14.28 1795
2016-11-21 Monday 26.08 13286

Looking at this we have the first week of almost no rain (1.38mm, 0.17mm, 1.76mm) and then on the same days the next week, very heavy rain for three days (25.67mm, 14.28mm, 26.08mm). It doesn’t appear though that there is much difference in the issues though. There are fewer issues on the rainy Saturday and Monday, but a greater count of issues on the rainy Sunday.

Of course the initial assumption that a library may be affected in a similar way to a high street may not be at all true. The opposite may be the case, and it may be that there’s little to learn from retail behaviours for library serices. Other climate data is available for things like temperature, which may be interesting to look at. Some of those are more detailed to a single location, so we could try to watch trends in usage compared to temperature in individual libraries.