Skip to content

Commit

Permalink
Push 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlindblad committed Mar 18, 2020
1 parent 136feb7 commit b4b9c36
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 66 deletions.
2 changes: 0 additions & 2 deletions CRAN-RELEASE

This file was deleted.

4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: schrute
Title: The Entire Transcript from the Office in Tidy Format
Version: 0.1.1
Version: 0.2.0
Authors@R:
c(person(given = "Brad",
family = "Lindblad",
Expand Down Expand Up @@ -36,4 +36,4 @@ VignetteBuilder:
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
schrute 0.1.2
* Added IMDB ratings, votes and air dates

# schrute 0.1.1
* Minor bug fixes
* Added writer and director feature columns
Expand Down
5 changes: 4 additions & 1 deletion R/data-theoffice.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' The entire script transcriptions from The Office
#'
#'
#' @format A tibble with 55130 observations of 9 variables:
#' @format A tibble with 55130 observations of 12 variables:
#' \describe{
#' \item{index}{row index}
#' \item{season}{season number}
Expand All @@ -12,6 +12,9 @@
#' \item{character}{name of the character saying the line}
#' \item{text}{words spoken by that actor}
#' \item{text_w_direction}{words spoken by that actor with stage direction included}
#' \item{imdb_rating}{rating from imdb}
#' \item{total_votes}{total votes for episode on imdb}
#' \item{air_date}{date the episode originally aired}
#'}
#' @source \url{https://transcripts.foreverdreaming.org}
"theoffice"
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ downloads](https://cranlogs.r-pkg.org/badges/schrute)](https://cran.r-project.or

Analyze and have fun with the text from the best series of all time

Also available in python as the [schrutepy package](https://github.com/bradlindblad/schrutepy)

## Installation

You can install the released version of schrute from
Expand All @@ -42,16 +40,19 @@ library(tibble)

tibble::glimpse(schrute::theoffice)
#> Observations: 55,130
#> Variables: 9
#> $ index <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, …
#> $ season <chr> "01", "01", "01", "01", "01", "01", "01", "01",…
#> $ episode <chr> "01", "01", "01", "01", "01", "01", "01", "01",…
#> $ episode_name <chr> "Pilot", "Pilot", "Pilot", "Pilot", "Pilot", "P…
#> $ director <chr> "Ken Kwapis", "Ken Kwapis", "Ken Kwapis", "Ken …
#> $ writer <chr> "Ricky Gervais;Stephen Merchant;Greg Daniels", …
#> $ character <chr> "Michael", "Jim", "Michael", "Jim", "Michael", …
#> $ text <chr> "All right Jim. Your quarterlies look very good…
#> $ text_w_direction <chr> "All right Jim. Your quarterlies look very good…
#> Variables: 12
#> $ index <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1…
#> $ season <chr> "01", "01", "01", "01", "01", "01", "01", "01", "01"…
#> $ episode <chr> "01", "01", "01", "01", "01", "01", "01", "01", "01"…
#> $ episode_name <chr> "Pilot", "Pilot", "Pilot", "Pilot", "Pilot", "Pilot"…
#> $ director <chr> "Ken Kwapis", "Ken Kwapis", "Ken Kwapis", "Ken Kwapi…
#> $ writer <chr> "Ricky Gervais;Stephen Merchant;Greg Daniels", "Rick…
#> $ character <chr> "Michael", "Jim", "Michael", "Jim", "Michael", "Mich…
#> $ text <chr> "All right Jim. Your quarterlies look very good. How…
#> $ text_w_direction <chr> "All right Jim. Your quarterlies look very good. How…
#> $ imdb_rating <dbl> 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.…
#> $ total_votes <int> 3706, 3706, 3706, 3706, 3706, 3706, 3706, 3706, 3706…
#> $ air_date <fct> 2005-03-24, 2005-03-24, 2005-03-24, 2005-03-24, 2005…
```

Or view the short vignette with:
Expand Down
5 changes: 2 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## Resubmission comments
* Minor bug fix
* added 3 new fields to dataset

## Test environments
* local Linux Mint 19.3, R 3.6.1
* local Linux Mint 19.3, R 3.6.3
* ubuntu 14.04 (on travis-ci), R 3.6.1
* win-builder (devel and release)

Expand Down
7 changes: 7 additions & 0 deletions data-raw/get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ theoffice <- final %>%
director,writer,
character,text,text_w_direction)

imdb <- read.csv('https://github.com/raw/rfordatascience/tidytuesday/master/data/2020/2020-03-17/office_ratings.csv') %>%
dplyr::mutate(season = ifelse(nchar(season) < 2, paste0("0", season), season)) %>%
dplyr::mutate(episode = ifelse(nchar(episode) < 2, paste0("0", episode), episode))

theoffice <- theoffice %>%
dplyr::left_join(imdb, by = c('season', 'episode')) %>%
dplyr::select(-title)

usethis::use_data(theoffice, overwrite = TRUE)

Binary file modified data/theoffice.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 47 additions & 20 deletions docs/articles/theoffice.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/theoffice_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b4b9c36

Please sign in to comment.