Coder Social home page Coder Social logo

ggtextparallels's Introduction

ggtextparallels

The goal of ggtextparallels is twofold: (1) to approximate fancy and expensive tools like the Synopsis Quattuor Evangeliorum, an essential tool for biblical scholars; and (2) to study biblical passages across multiple translations. Thanks to the people at BibleSearch ggtextparallels now supports over 300 versions across 277 languages.

Installation

ggtextparallels is not on CRAN, but can be installed with devtools:

devtools::install_github("daranzolin/ggtextparallels")
library(ggtextparallels)

Preparation

ggtextparallels relies on two APIs: the Perseus Digital Library and BibleSearch. An API key is required to access the versions and translations from BibleSearch, but you can obtain one free here. Add the key to your .Renviron, and install rbiblesearch from GitHub:

devtools::install_github("daranzolin/rbiblesearch")
rbiblesearch::set_biblesearch_key("your_key_here")

ggtextparallel

ggtextparallel creates a grid of text for common stories across the four gospels. In the examples below, the story of the healing of Peter's Mother-in-law is displayed in its Matthean, Markan, and Lukan contexts.

The function takes three arguments: a parallel_no, which can be gleaned from gospel_parallels, version, 304 of which can be obtained from biblesearch_versions, and words_per_row, which allows users to adjust the amount of words displayed on each row.

#> # A tibble: 304 x 12
#>            id                                                        name
#>  *      <chr>                                                       <chr>
#>  1  aai-AAINT                               Tur gewasin o baibasit boubun
#>  2  aau-AAUNT                                       God so Sokior-ok Iwon
#>  3  abt-ABTNT                                                  Gotna Kudi
#>  4 abt-ABTWNT                                                 Gotna kundi
#>  5  aby-ABYNT                                            Godinu irau wake
#>  6  acf-ACFNT               Tèstèman nèf-la: Épi an posyòn an liv samz-la
#>  7 acr-ACRNNT                Ri utzilaj tzij re ri kanimajawal Jesucristo
#>  8  acr-ACRNT                                   I 'utz laj tzij re i dios
#>  9 acr-ACRTNT                Ri utzilaj tzij re ri kanimajawal Jesucristo
#> 10  acu-ACUNT Yuse chichame aarmauri; Yaanchuik, Chicham; Yamaram Chicham
#> # ... with 294 more rows, and 10 more variables: lang <chr>,
#> #   lang_code <chr>, contact_url <chr>, audio <chr>, copyright <chr>,
#> #   info <chr>, lang_name <chr>, lang_name_eng <chr>, abbreviation <chr>,
#> #   updated_at <chr>

367 gospel parallels are available:

#> # A tibble: 367 x 5
#>                                           Pericope Matthew  Mark    Luke
#>                                              <chr>   <chr> <chr>   <chr>
#>  1                                        Prologue     1.1   1.1   1.1-4
#>  2    The Promise of the Birth of John the Baptist                1.5-25
#>  3                                The Annunciation               1.26-38
#>  4                       Mary's Visit to Elizabeth               1.39-56
#>  5                   The Birth of John the Baptist               1.57-80
#>  6                          The Genealogy of Jesus  1.2-17       3.23-38
#>  7                              The Birth of Jesus 1.18-25         2.1-7
#>  8               The Adoration of the Infant Jesus  2.1-12        2.8-20
#>  9 The Circumcision and Presentation in the Temple               2.21-38
#> 10                The Flight into Egypt and Return 2.13-21              
#> # ... with 357 more rows, and 1 more variables: John <chr>

Words common to each pericope are listed in the plot caption.

Examples

English (ESV)

Here I request the English, ESV translation of 'The Healing of Peter's Mother-in-Law':

ggtextparallel(parallel_no = 37, version = "eng-ESV", words_per_row = 6)

Koine Greek

Flip the version argument to "grc":

ggtextparallel(37, "grc", 5)

Spanish (Biblia Reina Valera 1960)

ggtextparallel(37, "spa-RVR1960", 6)

gglangparallel

gglangparallel has a similar output, but the facets are by version instead of book. In the example below, Romans 5:6 is displayed in English (ESV), Spanish, and French.

gglangparallel(versions = c("eng-ESV", "spa-RVR1960", "fra-LSG"), book = "romans", verses = "5:6", words_per_row = 7)

  • Common word highlighting
  • Vignette
  • shiny app

ggtextparallels's People

Contributors

daranzolin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

shaoyoucheng

ggtextparallels's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.