-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
92 lines (73 loc) · 2.02 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
86
87
88
89
90
91
92
---
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%"
)
```
# gilmoregirls
<!-- badges: start -->
<!-- badges: end -->
The goal of gilmoregirls is to provide the complete script transcription of the Gilmore Girls (*work in progress*) and information about the episodes of the TV Show.
## Installation
You can install the development version of gilmoregirls from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("lgiselebock/gilmoregirls")
```
## Example
The `gilmoregirls` package comes with one dataset, that contains the information about all the episodes in the show.
```{r example}
library(gilmoregirls)
dplyr::glimpse(gilmoregirls_info)
```
### Audience (in millions) in the USA
```{r}
gilmoregirls_info |>
dplyr::mutate(season = as.factor(season)) |>
ggplot2::ggplot() +
ggplot2::aes(
x = index,
y = us_views_millions,
fill = season,
width = 0.5
) +
ggplot2::geom_col() +
ggplot2::labs(
x = "Episodes",
y = "Audience (millions) in the USA",
fill = "Season"
) +
ggplot2::scale_x_continuous(breaks = seq(0, 153, 20)) +
ggplot2::scale_y_continuous(
limits = c(0, 8),
breaks = seq(0, 8, 2)
) +
ggplot2::scale_fill_manual(
values = c(
"#d4b9a9",
"#5271ff",
"#52c5c7",
"#c131e8",
"#fc9b5e",
"#ffdd49",
"#cd570f"
)
) +
ggplot2::theme_minimal() +
ggplot2::theme(
panel.grid.major.x = ggplot2::element_blank(),
panel.grid.minor = ggplot2::element_blank(),
legend.position = c(1.06, 1.06),
legend.justification = c("right", "top"),
legend.box.just = "right",
plot.margin = ggplot2::unit(c(1, 1, 1, 1), "cm"),
text = ggplot2::element_text(size = 10)
)
```
In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN.