-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
85 lines (54 loc) · 1.83 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# datardis <img src="misc/datardis_hex.png" align="right" height="240"/>
<!-- badges: start -->
<img src="https://cranlogs.r-pkg.org/badges/datardis"/><img src="https://cranlogs.r-pkg.org/badges/grand-total/datardis"/><img src="https://www.r-pkg.org/badges/version/datardis"/>
<!-- badges: end -->
The goal of datardis is to provide datasets from the **Doctor Who** and **Torchwood** TV shows.
Six datasets are available, three for each show:
🎞️ **Dr Who**
- **drwho_episodes**
- **drwho_directors**
- **drwho_writers**
🎞️ **Torchwood**
- **torchwood_episodes**
- **torchwood_directors**
- **torchwood_writers**
## Installation
You can download and install the package from CRAN:
```{r CRAN, echo=TRUE, eval=FALSE, warning=FALSE, message=FALSE}
install.packages("datardis")
```
You can install the development version from [GitHub](https://github.com/) with:
```{r dev version, echo=TRUE, eval=FALSE, warning=FALSE, message=FALSE}
devtools::install_github("KittJonathan/datardis")
```
## Examples
```{r examples, message=FALSE, warning=FALSE}
## Load packages
library(datardis)
library(tidyverse)
## Find maximum number of UK viewers for Doctor Who (in millions)
max(drwho_episodes$uk_viewers, na.rm = TRUE)
## Find who wrote the most episodes for Doctor Who
drwho_writers |>
count(writer, sort = TRUE) |>
head(5)
## Find who directed the most episodes for Doctor Who
drwho_directors |>
count(director, sort = TRUE) |>
head(5)
```
## News: datardis v.0.0.4
- added last Dr Who episodes (2022 specials)
- replaced `%>%` pipe with `|>` pipe in examples