-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
93 lines (71 loc) · 2.6 KB
/
README.Rmd
File metadata and controls
93 lines (71 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# RCLC <img src='man/figures/logo.png' align="right" height="138.5" /></a>
<!-- badges: start -->
<!-- badges: end -->
The goal of RCLC (Reed College Library Checkout) is to provide an easy-to-use and insightful dataset with clear information about book checkouts from the Reed Hauser Memorial Library as well as the PARC library from 2018 to 2020. Each observation in this data set corresponds to a checkout!
## Installation
The development version of Reed College Library Checkout is available from
[GitHub](https://github.com/Reed-Math241/pkgGrpn) with:
```r
library(devtools)
install_github("Reed-Math241/pkgGrpn")
```
## Usage
To import our dataset, just run:
```{r}
library(RCLC)
# Sourcing the data directly from the package
checkouts <- reed_checkouts # Also possible to use RCLC::reed_checkouts
```
The three facilities in which Reedies could checkout resources are the IMC, PARC, and the Hauser Library. To get the checkouts data for the IMC or the PARC, you may use the `get_checkouts` function as such:
```{r, eval=FALSE}
# Analogous to `reed_checkouts
checkouts <- get_checkouts() # Default value returns entire dataset, no argument needed
# Get PARC checkout data
PARC_checkouts <- get_checkouts(location = "PARC")
# Get IMC checkout data
IMC_checkouts <- get_checkouts(location = "IMC")
```
The `get_checkouts` function is versatile! You could also query substrings of checkout locations to get various filterings of the checkout data. Consider the following code, where the user obtains musical score checkouts:
```{r, eval=FALSE}
# Get musical score checkout data
score_checkouts <- get_checkouts(location = "Score")
```
## Example
Here is an example of our data in action! This is a heatmap (over a calendar) of checkout data by day in 2019 v. 2020.
```{r, warning=F, message=F}
library(openair)
library(dplyr)
filtered <- reed_checkouts %>%
filter(as.numeric(strftime(Loaned, "%m")) %in% 2:5) %>%
group_by(Loaned) %>%
summarise(checkouts = n()) %>%
rename(date=Loaned)
```
Can you think of why 2020 looks so different from 2019? 🤔
```{r}
calendarPlot(filtered,
pollutant = "checkouts",
year = 2019,
main = "Checkouts 2019 (Redux)",
limits = c(0, max(filtered$checkouts))
)
```
```{r}
calendarPlot(filtered,
pollutant = "checkouts",
year = 2020,
main = "Checkouts 2020 (Redux)",
limits = c(0, max(filtered$checkouts))
)
```