20  Counting Words

Readings

These readings are focused on working with factors in R

Guided Instruction

In this file, the “Extra Enrichment” section is just that, extra. It demonstrates some things the book doesn’t cover and may come in handy someday in the future, but you can skim it or skip it entirely to make time for mastering more critical skills. Factors and forcats

In 1978 Susan Easton Black wrote an Ensign article, Names of Christ in the Book of Mormon that states: “Even statistically, he is the dominant figure of the Book of Mormon.”

We are going to use some of our string skills to count words in the New Testament and in the Book of Mormon.

  1. In a previous week we learned to download zip files, unzip them, and then read in their content. This process is greatly simplified with the rio package (dealing with zipped folders may be more tricky). rio is a package that can read in a wide variety of file types with one easy command. After installing the rio package download the data using this code:
scriptures_data <- rio::import("http://scriptures.nephi.org/downloads/lds-scriptures.csv.zip") %>% 
  as_tibble()
  1. Calculate the average verse length (number of words) in the New Testament compared to the Book of Mormon.
  2. Count how often the word “Jesus” is used in the New Testament compared to the Book of Mormon.
  3. Create a visualization to show the distribution of word count by verse for each book in the Book of Mormon.
    • Count how many words there are per verse
    • Since there are 15 books, you should graphically depict/summarize 15 distributions of word counts.
  4. Create an .qmd file to show your results (including the graph).
  5. Render your .qmd, then push all the files created in the rendering process into your GitHub repository.

Submit

In I-learn submit a link to the .md file on GitHub.