Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emilhvitfeldt/hcandersenr
An R Package for H.C. Andersens fairy tales
https://github.com/emilhvitfeldt/hcandersenr
andersens-fairy-tales r text-mining
Last synced: about 2 months ago
JSON representation
An R Package for H.C. Andersens fairy tales
- Host: GitHub
- URL: https://github.com/emilhvitfeldt/hcandersenr
- Owner: EmilHvitfeldt
- License: other
- Created: 2017-07-27T21:32:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T22:57:20.000Z (almost 5 years ago)
- Last Synced: 2024-10-28T17:26:08.383Z (about 2 months ago)
- Topics: andersens-fairy-tales, r, text-mining
- Language: R
- Size: 11.5 MB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---# hcandersenr
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
dpi = 200,
fig.path = "man/figures/README-"
)
```[![R build status](https://github.com/EmilHvitfeldt/hcandersenr/workflows/R-CMD-check/badge.svg)](https://github.com/EmilHvitfeldt/hcandersenr/actions)
[![Codecov test coverage](https://codecov.io/gh/EmilHvitfeldt/hcandersenr/branch/master/graph/badge.svg)](https://codecov.io/gh/EmilHvitfeldt/hcandersenr?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/hcandersenr)](https://cran.r-project.org/package=hcandersenr)
[![Downloads](http://cranlogs.r-pkg.org/badges/hcandersenr)](https://CRAN.R-project.org/package=hcandersenr)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
[![DOI](https://zenodo.org/badge/98581517.svg)](https://zenodo.org/badge/latestdoi/98581517)## An R Package for H.C. Andersens fairy tales
This package contains (most) the complete texts of 157 fairy tales of H.C. Andersen, in a number of different languages. formatted to be convenient for text analysis. Where each text is formatted to elements of about 80 characters. The package contains:
* `hcandersen_da`: `r length(unique(hcandersenr::hcandersen_da$book))` out of the 157 Fairy tales in Danish
* `hcandersen_de`: `r length(unique(hcandersenr::hcandersen_de$book))` out of the 157 Fairy tales in German
* `hcandersen_en`: `r length(unique(hcandersenr::hcandersen_en$book))` out of the 157 Fairy tales in English
* `hcandersen_es`: `r length(unique(hcandersenr::hcandersen_es$book))` out of the 157 Fairy tales in Spanish
* `hcandersen_fr`: `r length(unique(hcandersenr::hcandersen_fr$book))` out of the 157 Fairy tales in French
* `EK`: dataframe with ID, names and publishing dates
* `hca_fairytales`: Complete collection of all fairytales in this package## Avaliable fairytales
```{r, fig.height=18, fig.width=7, message=FALSE, warning=FALSE}
library(hcandersenr)
library(tidyverse)
hca_fairytales() %>%
select(book, language) %>%
unique() %>%
mutate(langauge = fct_relevel(language, c("English", "Spanish", "German", "Danish", "French"))) %>%
ggplot(aes(langauge, book)) +
geom_raster(alpha = 0.3) +
scale_x_discrete(position = "top")
```## Installation
To install the development version from Github:
```{r, eval=FALSE}
library(devtools)
install_github("EmilHvitfeldt/hcandersenr")
library(hcandersenr)
```