Skip to content

Guille1799/RYSE-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RYSE — League of Legends elite performance analytics

Interactive Shiny dashboard for exploring match- and player-level metrics among Master, Grandmaster, and Challenger players. Built as the practical component of the RYSE master’s thesis: clustering, random-forest win factors, head-to-head prediction, and a structured “key findings” narrative.

Thesis (memoria)

Full academic write-up (Google Docs):

RYSE — Memoria

GitHub repositories (portfolio vs thesis)

  • This repo (e.g. personal RYSE-v2): current v2 codebase — split R/, renv, i18n, tests. Use this link on your CV for recruiters.
  • Original thesis repo (RYSE-TFM or similar): frozen v1 layout (codigo/, data/) for the master’s submission. Keep it public if you want the academic reference; it does not need to match this folder structure.

You can keep both on your GitHub profile: thesis = historical artifact; personal v2 = living portfolio.

Project layout

File / folder Purpose
app.R Entry point: activates renv, then sources the pieces below
R/startup_data.R Packages, here::i_am, i18n, loading .rds, derived tables, themes
R/ui_app.R Shiny ui definition
R/server_app.R Shiny server function
R/i18n.R, R/content_ui.R Translations and long-form guide content

Data paths use here (here::i_am("app.R") in startup) so files resolve from the project root.

Requirements

  • R ≥ 4.2 (lockfile recorded with 4.5.3; use the same major.minor if possible)

  • Reproducible packages via renv: after cloning, from the project root in R run:

    renv::restore()

    This installs the package versions listed in renv.lock into renv/library/ (ignored by Git; large but local).

  • If you are not using renv, install packages manually as declared in app.R / R/startup_data.R (e.g. shiny, tidyverse, bslib, thematic, here, …).

If here is missing and you install packages by hand:

install.packages("here")

Data and artifacts (local only)

The repository does not ship large binary data. Place these next to app.R (or clone into the same layout):

Path Role
ryse_db_elite_PURIFICADA.rds Main match/player table
resultados_memoria/*.rds Precomputed RF, ALE, ideal profile, centroids, case study
h2h_glm/*.rds GLM H2H models per role
h2h_rf/*.rds Random forest H2H models per role

Without these files, the app will fail at startup when loading RDS objects.

How to run

Option A — PowerShell (Windows)

  1. Open PowerShell.

  2. Go to the project folder (adjust if your copy lives elsewhere):

    cd C:\Users\Guille\Desktop\RYSE
  3. (First time / new clone) Optional: restore packages with renv — start R in this folder and run renv::restore(), or rely on .Rprofile when using RStudio.

  4. Start the app with Rscript (adjust the path to match your R installation):

    & "C:\Program Files\R\R-4.5.3\bin\Rscript.exe" -e "shiny::runApp('app.R', launch.browser = TRUE)"

    Typical R installs use C:\Program Files\R\R-<version>\bin\Rscript.exe. If Rscript is on your PATH, you can use:

    Rscript -e "shiny::runApp('app.R', launch.browser = TRUE)"

The browser should open at http://127.0.0.1:<port>/. If it does not, copy the URL printed in the console.

Option B — RStudio / Positron

  1. Open the project folder (.Rprofile runs renv/activate.R automatically in an interactive session).

  2. Run renv::restore() once if needed.

  3. Open app.R and click Run App, or in the R console:

    shiny::runApp()

Pre-deployment checks

From the project root, after renv::restore() and with all .rds files in place:

Rscript scripts/check_release.R
Rscript tests/testthat.R

scripts/check_release.R parses every app.R / R/*.R file and checks that required data paths exist (same layout as R/startup_data.R). tests/testthat.R runs unit tests for i18n helpers (tr, filter choice labels).

Optional full load test (slow; confirms libraries + RDS load):

source("renv/activate.R")
source("R/startup_data.R", encoding = "UTF-8")

Manual browser QA: scripts/manual_testing_checklist.txt. After deployment: scripts/deploy_smoke.txt.

Deploy to shinyapps.io

Deployment must be done from your machine (or CI with your token): this repo cannot log into your Posit / shinyapps account for you.

  1. Create or use a shinyapps.io account and install the publishing package (from the project root, after renv::restore()):

    renv::install("rsconnect")
  2. Authorize once (browser or token), for example:

    rsconnect::setAccountInfo(name = "<account>",
      token = "<token>",
      secret = "<secret>")

    Use the token/secret from the shinyapps.io dashboard (Account → Tokens).

  3. Ensure all .rds files are in the project folder (same layout as locally). rsconnect::deployApp() bundles the app directory; check application size limits.

  4. Publish version 2 as a new app with an English-friendly URL slug, for example:

    • Suggested app name: ryse-lol-v2 or ryse-performance-v2 (lowercase and hyphens work well in URLs).
    setwd("path/to/RYSE")  # project root (where app.R is)
    rsconnect::deployApp(appName = "ryse-lol-v2")

    Live v2 URL (this project): https://guillermomartindeoliva.shinyapps.io/ryse-lol-v2/

  5. Stable v1 with a “use v2” banner: the v2 URL and banner logic live in code (R/startup_data.R and R/server_app.R). The banner is hidden automatically on ryse-lol-v2 (detected via session$clientData$url_pathname). No shinyapps environment variables are required.

    Redeploy v1 from this repository so the running code includes output$v2_banner_slot (the old monolithic thesis APP.R does not). Use the same appName as your existing v1 app so the public URL does not change. Example in R (after renv::load — see Deploy troubleshooting if deployApp complains about renv):

    setwd("C:/Users/Guille/Desktop/RYSE")  # or your path
    source("renv/activate.R")
    renv::load(project = normalizePath(getwd()))
    library(rsconnect)
    deployApp(
      appDir        = normalizePath(getwd()),
      appPrimaryDoc = "app.R",
      appName       = "YOUR_V1_APP_NAME"  # exact name of v1 on shinyapps.io
    )

    Or edit APP_NAME_V1 in scripts/redeploy_v1_with_v2_link.R and source("scripts/redeploy_v1_with_v2_link.R") from the project root.

Deploy troubleshooting (renv + rsconnect)

If deployApp fails with Library and lockfile are out of sync even after renv::status() is clean, run renv::load(project = "<path-to-RYSE>") before deployApp, or set Sys.setenv(RENV_CONFIG_SANDBOX_ENABLED = "FALSE") and restart R. See also scripts/redeploy_v1_with_v2_link.R.

Attribution

Match and player data were obtained from the Riot Games API and processed for this research. Use complies with Riot’s developer terms; this tool is for academic and analytical purposes.

License

Specify your license here (e.g. MIT, or “all rights reserved” for thesis-only work).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages