DOI: 10.5281/zenodo.2437859
title: Brisbane Library Checkout Data

description: <em>This has been copied from the README.md file</em>

bris-lib-checkout

This provides tidied up data from the Brisbane library checkouts

Retrieving and cleaning the data

The script for retrieving and cleaning the data is made available in scrape-library.R.

The data


	The data/ folder contains the tidy data
	The data-raw/ folder contains the raw data


data/

This contains four tidied up dataframes:


	tidy-brisbane-library-checkout.csv
	metadata_branch.csv
	metadata_heading.csv
	metadata_item_type.csv


tidy-brisbane-library-checkout.csv contains the following columns, with the metadata file metadata_heading containing the description of these columns.

knitr::kable(readr::read_csv("data/metadata_heading.csv"))<br>
#&gt; Parsed with column specification:<br>
#&gt; cols(<br>
#&gt;   heading = col_character(),<br>
#&gt;   heading_explanation = col_character()<br>
#&gt; )

heading

heading_explanation

Title

Title of Item

Author

Author of Item

Call Number

Call Number of Item

Item id

Unique Item Identifier

Item Type

Type of Item (see next column)

Status

Current Status of Item

Language

Published language of item (if not English)

Age

Suggested audience

Checkout Library

Checkout branch

Date

Checkout date

We also added year, month, and day columns.

The remaining data are all metadata files that contain meta information on the columns in the checkout data:

library(tidyverse)<br>
#&gt; ── Attaching packages ────────────── tidyverse 1.2.1 ──<br>
#&gt; ✔ ggplot2 3.1.0           ✔ purrr   0.2.5     <br>
#&gt; ✔ tibble  1.4.99.9006     ✔ dplyr   0.7.8     <br>
#&gt; ✔ tidyr   0.8.2           ✔ stringr 1.3.1     <br>
#&gt; ✔ readr   1.3.0           ✔ forcats 0.3.0<br>
#&gt; ── Conflicts ───────────────── tidyverse_conflicts() ──<br>
#&gt; ✖ dplyr::filter() masks stats::filter()<br>
#&gt; ✖ dplyr::lag()    masks stats::lag()<br>
knitr::kable(readr::read_csv("data/metadata_branch.csv"))<br>
#&gt; Parsed with column specification:<br>
#&gt; cols(<br>
#&gt;   branch_code = col_character(),<br>
#&gt;   branch_heading = col_character()<br>
#&gt; )

branch_code

branch_heading

ANN

Annerley

ASH

Ashgrove

BNO

Banyo

BRR

BrackenRidge

BSQ

Brisbane Square Library

BUL

Bulimba

CDA

Corinda

CDE

Chermside

CNL

Carindale

CPL

Coopers Plains

CRA

Carina

EPK

Everton Park

FAI

Fairfield

GCY

Garden City

GNG

Grange

HAM

Hamilton

HPK

Holland Park

INA

Inala

IPY

Indooroopilly

MBG

Mt. Coot-tha

MIT

Mitchelton

MTG

Mt. Gravatt

MTO

Mt. Ommaney

NDH

Nundah

NFM

New Farm

SBK

Sunnybank Hills

SCR

Stones Corner

SGT

Sandgate

VAN

Mobile Library

TWG

Toowong

WND

West End

WYN

Wynnum

ZIL

Zillmere

knitr::kable(readr::read_csv("data/metadata_item_type.csv"))<br>
#&gt; Parsed with column specification:<br>
#&gt; cols(<br>
#&gt;   item_type_code = col_character(),<br>
#&gt;   item_type_explanation = col_character()<br>
#&gt; )

item_type_code

item_type_explanation

AD-FICTION

Adult Fiction

AD-MAGS

Adult Magazines

AD-PBK

Adult Paperback

BIOGRAPHY

Biography

BSQCDMUSIC

Brisbane Square CD Music

BSQCD-ROM

Brisbane Square CD Rom

BSQ-DVD

Brisbane Square DVD

CD-BOOK

Compact Disc Book

CD-MUSIC

Compact Disc Music

CD-ROM

CD Rom

DVD

DVD

DVD_R18+

DVD Restricted - 18+

FASTBACK

Fastback

GAYLESBIAN

Gay and Lesbian Collection

GRAPHICNOV

Graphic Novel

ILL

InterLibrary Loan

JU-FICTION

Junior Fiction

JU-MAGS

Junior Magazines

JU-PBK

Junior Paperback

KITS

Kits

LARGEPRINT

Large Print

LGPRINTMAG

Large Print Magazine

LITERACY

Literacy

LITERACYAV

Literacy Audio Visual

LOCSTUDIES

Local Studies

LOTE-BIO

Languages Other than English Biography

LOTE-BOOK

Languages Other than English Book

LOTE-CDMUS

Languages Other than English CD Music

LOTE-DVD

Languages Other than English DVD

LOTE-MAG

Languages Other than English Magazine

LOTE-TB

Languages Other than English Taped Book

MBG-DVD

Mt Coot-tha Botanical Gardens DVD

MBG-MAG

Mt Coot-tha Botanical Gardens Magazine

MBG-NF

Mt Coot-tha Botanical Gardens Non Fiction

MP3-BOOK

MP3 Audio Book

NONFIC-SET

Non Fiction Set

NONFICTION

Non Fiction

PICTURE-BK

Picture Book

PICTURE-NF

Picture Book Non Fiction

PLD-BOOK

Public Libraries Division Book

YA-FICTION

Young Adult Fiction

YA-MAGS

Young Adult Magazine

YA-PBK

Young Adult Paperback

Example usage

Let’s explore the data

bris_libs &lt;- readr::read_csv("data/bris-lib-checkout.csv")<br>
#&gt; Parsed with column specification:<br>
#&gt; cols(<br>
#&gt;   title = col_character(),<br>
#&gt;   author = col_character(),<br>
#&gt;   call_number = col_character(),<br>
#&gt;   item_id = col_double(),<br>
#&gt;   item_type = col_character(),<br>
#&gt;   status = col_character(),<br>
#&gt;   language = col_character(),<br>
#&gt;   age = col_character(),<br>
#&gt;   library = col_character(),<br>
#&gt;   date = col_double(),<br>
#&gt;   datetime = col_datetime(format = ""),<br>
#&gt;   year = col_double(),<br>
#&gt;   month = col_double(),<br>
#&gt;   day = col_character()<br>
#&gt; )<br>
#&gt; Warning: 20 parsing failures.<br>
#&gt;    row     col expected  actual                         file<br>
#&gt; 587795 item_id a double REFRESH 'data/bris-lib-checkout.csv'<br>
#&gt; 590579 item_id a double REFRESH 'data/bris-lib-checkout.csv'<br>
#&gt; 590597 item_id a double REFRESH 'data/bris-lib-checkout.csv'<br>
#&gt; 595774 item_id a double REFRESH 'data/bris-lib-checkout.csv'<br>
#&gt; 597567 item_id a double REFRESH 'data/bris-lib-checkout.csv'<br>
#&gt; ...... ....... ........ ....... ............................<br>
#&gt; See problems(...) for more details.

We can count the number of titles, item types, suggested age, and the library given:

library(dplyr)<br>
count(bris_libs, title, sort = TRUE)<br>
#&gt; # A tibble: 121,046 x 2<br>
#&gt;    title                                n<br>
#&gt;    &lt;chr&gt;                            &lt;int&gt;<br>
#&gt;  1 Australian house and garden       1469<br>
#&gt;  2 New scientist (Australasian ed.)  1380<br>
#&gt;  3 Australian home beautiful         1331<br>
#&gt;  4 Country style                     1229<br>
#&gt;  5 The New idea                      1186<br>
#&gt;  6 Hello                             1133<br>
#&gt;  7 Woman's day                       1096<br>
#&gt;  8 Country life                      1056<br>
#&gt;  9 Better homes and gardens. (AU)    1041<br>
#&gt; 10 Yi Zhou Kan                        884<br>
#&gt; # … with 121,036 more rows<br>
count(bris_libs, item_type, sort = TRUE)<br>
#&gt; # A tibble: 69 x 2<br>
#&gt;    item_type       n<br>
#&gt;    &lt;chr&gt;       &lt;int&gt;<br>
#&gt;  1 PICTURE-BK 121126<br>
#&gt;  2 DVD         98283<br>
#&gt;  3 AD-PBK      91671<br>
#&gt;  4 JU-PBK      88402<br>
#&gt;  5 NONFICTION  76168<br>
#&gt;  6 AD-MAGS     60516<br>
#&gt;  7 AD-FICTION  53090<br>
#&gt;  8 LARGEPRINT  19113<br>
#&gt;  9 JU-FICTION  17261<br>
#&gt; 10 LOTE-BOOK   12303<br>
#&gt; # … with 59 more rows<br>
count(bris_libs, age, sort = TRUE)<br>
#&gt; # A tibble: 5 x 2<br>
#&gt;   age           n<br>
#&gt;   &lt;chr&gt;     &lt;int&gt;<br>
#&gt; 1 ADULT    420287<br>
#&gt; 2 JUVENILE 283902<br>
#&gt; 3 YA        13715<br>
#&gt; 4 &lt;NA&gt;        147<br>
#&gt; 5 UNKNOWN      36<br>
count(bris_libs, library, sort = TRUE)<br>
#&gt; # A tibble: 38 x 2<br>
#&gt;    library     n<br>
#&gt;    &lt;chr&gt;   &lt;int&gt;<br>
#&gt;  1 SBK     49154<br>
#&gt;  2 BSQ     45968<br>
#&gt;  3 CNL     45642<br>
#&gt;  4 IPY     44569<br>
#&gt;  5 GCY     43090<br>
#&gt;  6 CDE     42775<br>
#&gt;  7 ASH     42086<br>
#&gt;  8 WYN     35124<br>
#&gt;  9 KEN     33947<br>
#&gt; 10 MTO     31201<br>
#&gt; # … with 28 more rows

License

This data is provided under a CC BY 4.0 license

It has been downloaded from Brisbane library checkouts, and tidied up using the code in data-raw.
description: It has been downloaded from [Brisbane library checkouts](https://www.data.brisbane.qld.gov.au/data/dataset/library-checkouts-branch-date#), and tidied up using the code in `data-raw`.