Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
Puts figures in man directory, updates some copy.
  • Loading branch information
benjcunningham committed Dec 28, 2017
1 parent b26c565 commit e7be994
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ knitr::opts_knit$set(root.dir = 'tests/testthat/')
```

```{r, echo = FALSE}
knitr::opts_chunk$set(fig.path = "README-")
knitr::opts_chunk$set(fig.path = "man/figures/README-")
```

```{r echo=FALSE, message=FALSE}
Expand All @@ -23,7 +23,6 @@ install.packages("../..", repos = NULL, type = "source")

Read and write video subtitle formats.


## Install

```{r eval=FALSE}
Expand All @@ -33,10 +32,9 @@ devtools::install_github("benjcunningham/subtitler")
## Quick Demos

```{r message=FALSE}
library(subtitler)
library(tidyverse)
library(tidytext)
library(stringr)
library(subtitler)
```

### Adjusting Timestamps
Expand All @@ -61,7 +59,7 @@ read_srt("Always_Sunny_S10E04.srt") %>%

### Text Mining

The package may also be useful for getting subtitles into a tidytext workflow. For example, [I previously reproduced](http://benjcunningham.org/2017/03/05/introducing-subtitler-0-1-0.html) part of [this article by Oliver Roeder of FiveThirtyEight](https://fivethirtyeight.com/features/complete-catalog-curses-deaths-quentin-tarantino-films/), cataloging all of the times someone swore in one of Quentin Tarantino's movies. The script below mirrors the analysis on subtitles from _The Wolf of Wall Street_.
The package may also be useful for getting subtitles into a tidytext workflow. For example, [I previously reproduced](https://benjcunningham.org/blog/introducing-subtitler-0-1-0.html) part of [this article by Oliver Roeder of FiveThirtyEight](https://fivethirtyeight.com/features/complete-catalog-curses-deaths-quentin-tarantino-films/), cataloging all of the times someone swore in one of Quentin Tarantino's movies. The script below mirrors the analysis on subtitles from _The Wolf of Wall Street_.

```{r wolf-demo, fig.width=10, fig.height=2}
df <- read_srt("The_Wolf_of_Wall_Street.srt")
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ Quick Demos
-----------

``` r
library(subtitler)
library(tidyverse)
library(tidytext)
library(stringr)
library(subtitler)
```

### Adjusting Timestamps
Expand Down Expand Up @@ -55,7 +54,7 @@ read_srt("Always_Sunny_S10E04.srt") %>%

### Text Mining

The package may also be useful for getting subtitles into a tidytext workflow. For example, [I previously reproduced](http://benjcunningham.org/2017/03/05/introducing-subtitler-0-1-0.html) part of [this article by Oliver Roeder of FiveThirtyEight](https://fivethirtyeight.com/features/complete-catalog-curses-deaths-quentin-tarantino-films/), cataloging all of the times someone swore in one of Quentin Tarantino's movies. The script below mirrors the analysis on subtitles from *The Wolf of Wall Street*.
The package may also be useful for getting subtitles into a tidytext workflow. For example, [I previously reproduced](https://benjcunningham.org/blog/introducing-subtitler-0-1-0.html) part of [this article by Oliver Roeder of FiveThirtyEight](https://fivethirtyeight.com/features/complete-catalog-curses-deaths-quentin-tarantino-films/), cataloging all of the times someone swore in one of Quentin Tarantino's movies. The script below mirrors the analysis on subtitles from *The Wolf of Wall Street*.

``` r
df <- read_srt("The_Wolf_of_Wall_Street.srt")
Expand All @@ -70,7 +69,7 @@ df %>%
scale_x_continuous(breaks = seq(0, 180, 60), limits = c(0, 180))
```

![](README-wolf-demo-1.png)
![](man/figures/README-wolf-demo-1.png)

License
-------
Expand Down
File renamed without changes

0 comments on commit e7be994

Please sign in to comment.