Permalink
Browse files

Updated links to ropensci rather than ropenscilabs; see #18

  • Loading branch information...
dgrtwo committed Jul 2, 2018
1 parent 205eb4d commit c0b0caf326b4c270cc8e024d8f1e4228cb543f8b
Showing with 89 additions and 91 deletions.
  1. +2 −2 DESCRIPTION
  2. +4 −4 README.Rmd
  3. +83 −85 README.md
View
@@ -10,8 +10,8 @@ Description: Download and process public domain works in the Project
License: GPL-2
LazyData: TRUE
Maintainer: David Robinson <admiral.david@gmail.com>
URL: http://github.com/ropenscilabs/gutenbergr
BugReports: http://github.com/ropenscilabs/gutenbergr/issues
URL: http://github.com/ropensci/gutenbergr
BugReports: http://github.com/ropensci/gutenbergr/issues
VignetteBuilder: knitr
Depends: R (>= 2.10)
Imports:
View
@@ -16,10 +16,10 @@ gutenbergr: R package to search and download public domain texts from Project Gu
**Authors:** [David Robinson](http://varianceexplained.org/)<br/>
**License:** [MIT](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/ropenscilabs/gutenbergr.svg?branch=master)](https://travis-ci.org/ropenscilabs/gutenbergr)
[![Build Status](https://travis-ci.org/ropensci/gutenbergr.svg?branch=master)](https://travis-ci.org/ropensci/gutenbergr)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/gutenbergr)]( https://CRAN.R-project.org/package=gutenbergr)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/i41bhbh87sb87w8o?svg=true)](https://ci.appveyor.com/project/ropenscilabs/gutenbergr)
[![Coverage Status](https://img.shields.io/codecov/c/github/ropenscilabs/gutenbergr/master.svg)](https://codecov.io/github/ropenscilabs/gutenbergr?branch=master)
[![Build status](https://ci.appveyor.com/api/projects/status/lqb7hngtj5epsmd1?svg=true)](https://ci.appveyor.com/project/ropensci/gutenbergr-dujv9)
[![Coverage Status](https://img.shields.io/codecov/c/github/ropensci/gutenbergr/master.svg)](https://codecov.io/github/ropensci/gutenbergr?branch=master)
Download and process public domain works from the [Project Gutenberg](https://www.gutenberg.org/) collection. Includes
@@ -40,7 +40,7 @@ install.packages("gutenbergr")
Or install the development version using [devtools](https://github.com/hadley/devtools) with:
```{r eval = FALSE}
devtools::install_github("ropenscilabs/gutenbergr")
devtools::install_github("ropensci/gutenbergr")
```
### Examples
View
168 README.md
@@ -8,10 +8,10 @@ gutenbergr: R package to search and download public domain texts from Project Gu
**Authors:** [David Robinson](http://varianceexplained.org/)<br/>
**License:** [MIT](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/ropenscilabs/gutenbergr.svg?branch=master)](https://travis-ci.org/ropenscilabs/gutenbergr)
[![Build Status](https://travis-ci.org/ropensci/gutenbergr.svg?branch=master)](https://travis-ci.org/ropensci/gutenbergr)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/gutenbergr)]( https://CRAN.R-project.org/package=gutenbergr)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/i41bhbh87sb87w8o?svg=true)](https://ci.appveyor.com/project/ropenscilabs/gutenbergr)
[![Coverage Status](https://img.shields.io/codecov/c/github/ropenscilabs/gutenbergr/master.svg)](https://codecov.io/github/ropenscilabs/gutenbergr?branch=master)
[![Build status](https://ci.appveyor.com/api/projects/status/lqb7hngtj5epsmd1?svg=true)](https://ci.appveyor.com/project/ropensci/gutenbergr-dujv9)
[![Coverage Status](https://img.shields.io/codecov/c/github/ropensci/gutenbergr/master.svg)](https://codecov.io/github/ropensci/gutenbergr?branch=master)
Download and process public domain works from the [Project Gutenberg](https://www.gutenberg.org/) collection. Includes
@@ -34,7 +34,7 @@ Or install the development version using [devtools](https://github.com/hadley/de
```r
devtools::install_github("ropenscilabs/gutenbergr")
devtools::install_github("ropensci/gutenbergr")
```
### Examples
@@ -52,25 +52,23 @@ library(gutenbergr)
gutenberg_works() %>%
filter(title == "Wuthering Heights")
#> # A tibble: 1 × 8
#> gutenberg_id title author gutenberg_author_id language
#> <int> <chr> <chr> <int> <chr>
#> 1 768 Wuthering Heights Brontë, Emily 405 en
#> gutenberg_bookshelf
#> <chr>
#> 1 Gothic Fiction/Movie Books/Best Books Ever Listings
#> # ... with 2 more variables: rights <chr>, has_text <lgl>
#> # A tibble: 1 x 8
#> gutenberg_id title author gutenberg_author_id language
#> <int> <chr> <chr> <int> <chr>
#> 1 768 Wuthering Heights Brontë, Emily 405 en
#> gutenberg_bookshelf rights has_text
#> <chr> <chr> <lgl>
#> 1 Gothic Fiction/Movi… Public… TRUE
# or just:
gutenberg_works(title == "Wuthering Heights")
#> # A tibble: 1 × 8
#> gutenberg_id title author gutenberg_author_id language
#> <int> <chr> <chr> <int> <chr>
#> 1 768 Wuthering Heights Brontë, Emily 405 en
#> gutenberg_bookshelf
#> <chr>
#> 1 Gothic Fiction/Movie Books/Best Books Ever Listings
#> # ... with 2 more variables: rights <chr>, has_text <lgl>
#> # A tibble: 1 x 8
#> gutenberg_id title author gutenberg_author_id language
#> <int> <chr> <chr> <int> <chr>
#> 1 768 Wuthering Heights Brontë, Emily 405 en
#> gutenberg_bookshelf rights has_text
#> <chr> <chr> <lgl>
#> 1 Gothic Fiction/Movi… Public… TRUE
```
Since we see that it has `gutenberg_id` 768, we can download it with the `gutenberg_download()` function:
@@ -79,19 +77,19 @@ Since we see that it has `gutenberg_id` 768, we can download it with the `gutenb
```r
wuthering_heights <- gutenberg_download(768)
wuthering_heights
#> # A tibble: 12,085 × 2
#> gutenberg_id text
#> <int> <chr>
#> 1 768 WUTHERING HEIGHTS
#> 2 768
#> 3 768
#> 4 768 CHAPTER I
#> 5 768
#> 6 768
#> 7 768 1801.--I have just returned from a visit to my landlord--the solitary
#> 8 768 neighbour that I shall be troubled with. This is certainly a beautiful
#> 9 768 country! In all England, I do not believe that I could have fixed on a
#> 10 768 situation so completely removed from the stir of society. A perfect
#> # A tibble: 12,085 x 2
#> gutenberg_id text
#> <int> <chr>
#> 1 768 WUTHERING HEIGHTS
#> 2 768 ""
#> 3 768 ""
#> 4 768 CHAPTER I
#> 5 768 ""
#> 6 768 ""
#> 7 768 1801.--I have just returned from a visit to my landlord--the solitary
#> 8 768 neighbour that I shall be troubled with. This is certainly a beautiful
#> 9 768 country! In all England, I do not believe that I could have fixed on a
#> 10 768 situation so completely removed from the stir of society. A perfect
#> # ... with 12,075 more rows
```
@@ -102,40 +100,40 @@ wuthering_heights
# 1260 is the ID of Jane Eyre
books <- gutenberg_download(c(768, 1260), meta_fields = "title")
books
#> # A tibble: 32,744 × 3
#> gutenberg_id text
#> <int> <chr>
#> 1 768 WUTHERING HEIGHTS
#> 2 768
#> 3 768
#> 4 768 CHAPTER I
#> 5 768
#> 6 768
#> 7 768 1801.--I have just returned from a visit to my landlord--the solitary
#> 8 768 neighbour that I shall be troubled with. This is certainly a beautiful
#> 9 768 country! In all England, I do not believe that I could have fixed on a
#> 10 768 situation so completely removed from the stir of society. A perfect
#> title
#> <chr>
#> 1 Wuthering Heights
#> 2 Wuthering Heights
#> 3 Wuthering Heights
#> 4 Wuthering Heights
#> 5 Wuthering Heights
#> 6 Wuthering Heights
#> 7 Wuthering Heights
#> 8 Wuthering Heights
#> 9 Wuthering Heights
#> # A tibble: 32,744 x 3
#> gutenberg_id text
#> <int> <chr>
#> 1 768 WUTHERING HEIGHTS
#> 2 768 ""
#> 3 768 ""
#> 4 768 CHAPTER I
#> 5 768 ""
#> 6 768 ""
#> 7 768 1801.--I have just returned from a visit to my landlord--the solitary
#> 8 768 neighbour that I shall be troubled with. This is certainly a beautiful
#> 9 768 country! In all England, I do not believe that I could have fixed on a
#> 10 768 situation so completely removed from the stir of society. A perfect
#> title
#> <chr>
#> 1 Wuthering Heights
#> 2 Wuthering Heights
#> 3 Wuthering Heights
#> 4 Wuthering Heights
#> 5 Wuthering Heights
#> 6 Wuthering Heights
#> 7 Wuthering Heights
#> 8 Wuthering Heights
#> 9 Wuthering Heights
#> 10 Wuthering Heights
#> # ... with 32,734 more rows
books %>%
count(title)
#> # A tibble: 2 × 2
#> title n
#> <chr> <int>
#> # A tibble: 2 x 2
#> title n
#> <chr> <int>
#> 1 Jane Eyre: An Autobiography 20659
#> 2 Wuthering Heights 12085
#> 2 Wuthering Heights 12085
```
It can also take the output of `gutenberg_works` directly. For example, we could get the text of all Aristotle's works, each annotated with both `gutenberg_id` and `title`, using:
@@ -146,30 +144,30 @@ aristotle_books <- gutenberg_works(author == "Aristotle") %>%
gutenberg_download(meta_fields = "title")
aristotle_books
#> # A tibble: 39,950 × 3
#> gutenberg_id text
#> <int> <chr>
#> 1 1974 THE POETICS OF ARISTOTLE
#> 2 1974
#> 3 1974 By Aristotle
#> 4 1974
#> 5 1974 A Translation By S. H. Butcher
#> 6 1974
#> 7 1974
#> 8 1974 [Transcriber's Annotations and Conventions: the translator left
#> 9 1974 intact some Greek words to illustrate a specific point of the original
#> 10 1974 discourse. In this transcription, in order to retain the accuracy of
#> title
#> <chr>
#> 1 The Poetics of Aristotle
#> 2 The Poetics of Aristotle
#> 3 The Poetics of Aristotle
#> 4 The Poetics of Aristotle
#> 5 The Poetics of Aristotle
#> 6 The Poetics of Aristotle
#> 7 The Poetics of Aristotle
#> 8 The Poetics of Aristotle
#> 9 The Poetics of Aristotle
#> # A tibble: 39,950 x 3
#> gutenberg_id text
#> <int> <chr>
#> 1 1974 THE POETICS OF ARISTOTLE
#> 2 1974 ""
#> 3 1974 By Aristotle
#> 4 1974 ""
#> 5 1974 A Translation By S. H. Butcher
#> 6 1974 ""
#> 7 1974 ""
#> 8 1974 [Transcriber's Annotations and Conventions: the translator left
#> 9 1974 intact some Greek words to illustrate a specific point of the original
#> 10 1974 discourse. In this transcription, in order to retain the accuracy of
#> title
#> <chr>
#> 1 The Poetics of Aristotle
#> 2 The Poetics of Aristotle
#> 3 The Poetics of Aristotle
#> 4 The Poetics of Aristotle
#> 5 The Poetics of Aristotle
#> 6 The Poetics of Aristotle
#> 7 The Poetics of Aristotle
#> 8 The Poetics of Aristotle
#> 9 The Poetics of Aristotle
#> 10 The Poetics of Aristotle
#> # ... with 39,940 more rows
```

0 comments on commit c0b0caf

Please sign in to comment.