1 of 15

An Introduction to an Interactive TPR-DB Interface using Rshiny Dashboard

Patrick Chu

The Education University of Hong Kong

2 of 15

TPR-DB database

  • Studies
    • Different source languages
    • Different target languages

  • Task
    • Dictation
    • Translation
    • Editing
    • Post-editing

  • Participants
    • Novice
    • Experts

  • Texts
    • 1-20

  • Data
    • Eye-tracking measures
    • keylogging measures

  • Tables
    • Sessions
    • Segments
    • Alignment groups
    • Source tokens
    • Target tokens
    • Activity units
    • Production units
    • Fixation units
    • Fixation data
    • Keystroke data
    • External resources

  • Features
    • Duration
    • Total reading time
    • Total number of fixations
    • Number of insertions
    • Number of deletions
    • Number of tokens
    • Word translation entropy (HTra)
    • Entropy of the cross value (Hcross)

3 of 15

R script for TPR-DB data analysis

4 of 15

R script for TPR-DB data analysis

5 of 15

Translation Progression Graph

source("D:/tprdb/bin/proGra.R")

ReadData("D:/tprdb/KTHJ08/Tables/P08_T1")

ProgGraph(X1=190000, X2=310000, Y1=100, Y2=130)

  • Task (dictation, translation, editing, post-editing)
  • Participants (novice, experts)
  • Texts (1-6)

6 of 15

Problems with the existing TPR-DB database

  • Translation researchers need to take a long time to understand the different parameters in the database

  • Require R programming skills to access the data in the database

  • Need to repeatedly modify the R scripts to try out different models

7 of 15

RShiny dashboard with interactive frontend user interface

  • Widgets
    • Radio buttons
    • Checkbox
    • Slider
    • Dropdown menu
    • Textbox input
  • Dynamic user interface
    • Reactive programming
  • Layout
    • Sidebar
    • Boxes
    • Tabs

8 of 15

Case study: Translation Progression graph

9 of 15

Free online Shiny app storage

  • http://Shinyapps.io/
  • 5 Free applications
  • 25 active hours/month

10 of 15

Useful R packages for data science

  • dplyr
    • filter (filter the data based on certain criteria)
    • select (select specific columns)
    • mutate (add a new column based on the values from various columns)
    • group_by (perform sorting and summarise functions on the predefined groups)
    • arrange (sort by one or more columns)
    • summarise (generate the mean, sd, max, min etc.)

  • tidyr
    • spread (long to wide data conversion)
    • gather (wide to long data conversion)
    • unite (concatenate two or more columns into one column)
    • separate (separate a column into two or more columns)
  • purr
    • map (apply the same function to different variables at the same time)
  • ggplot2

11 of 15

Recommended textbooks on R programming

12 of 15

Datacamp

  • https://www.datacamp.com/
  • More than 100 courses in R (4-6 hours each)

13 of 15

Future roadmaps for the online interactive interface

  • Create a frontend interface that is similar to the Radiant app (https://vnijs.shinyapps.io/radiant/)

  • Data
    • View
    • Visualize (distribution, scatterplot, boxplot)
    • Pivot (mean, sd, number of observations)

  • Modeling
    • Correlation
    • Regression
    • Clustering
    • Linear mixed effect modeling

14 of 15

Special Thanks

  • University of Macau (Multi Year Research Grant)
  • Prof. Li Defeng
  • Dr. Victoria Lei
  • Prof. Michael Carl
  • Dr. Moritz Schaeffer
  • Prof. Fabio Alves
  • All Momento bootcampers in the University of Macau!

15 of 15

An Introduction to an Interactive TPR-DB Interface using Rshiny Dashboard

Patrick Chu

The Education University of Hong Kong

Email: patrickhk83@Hotmail.com