| Title: | Interactive Topic Modeling and Bibliometric Analysis via Shiny |
|---|---|
| Description: | Provides a 'Shiny' graphical interface for the complete workflow of Latent Dirichlet Allocation (LDA) topic modelling on bibliometric data from Scopus and Web of Science. Steps include data import and deduplication, text preprocessing (stopword removal, stemming, n-grams, sparse-term filtering), statistical inference to select the optimal number of topics via coherence, final model training, and topic trend analysis over time using linear regression. All results can be exported as Excel files, RDS objects, and publication-quality plots. |
| Authors: | Javier De La Hoz-M [aut, cre] (ORCID: <https://orcid.org/0000-0001-7779-0803>) |
| Maintainer: | Javier De La Hoz-M <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.0 |
| Built: | 2026-06-08 11:38:40 UTC |
| Source: | https://github.com/javierdelahoz/ldashiny |
About Server
mod_about_server(id)mod_about_server(id)
id |
Shiny module id |
Server logic for importing, validating and combining Scopus/WoS datasets.
mod_import_bibliometrics_server(id)mod_import_bibliometrics_server(id)
id |
Shiny module ID. |
A list with one element:
A reactive expression returning the cleaned combined
data.frame.
Shiny module UI for importing and validating bibliometric datasets from Scopus and Web of Science in LDAShiny.
mod_import_bibliometrics_ui(id)mod_import_bibliometrics_ui(id)
id |
Shiny module ID. |
A Shiny UI element (tagList).
LDA Inference Module Server
mod_inference_server(id, dtm_reactive)mod_inference_server(id, dtm_reactive)
id |
Shiny module ID. |
dtm_reactive |
A reactive expression returning a |
A list with:
Reactive list of fitted LDA models, one per k.
Reactive data.frame with columns k and
coherence.
Reactive integer: k with highest mean coherence.
UI for running multiple LDA models over a range of topic counts (k) and selecting the best k via mean coherence.
mod_inference_ui(id)mod_inference_ui(id)
id |
Shiny module ID. |
A Shiny UI element (tagList).
Trains the final LDA model using the processed DTM. The number of topics (K) is automatically initialised from the inference module but can be overridden.
mod_lda_train() mod_lda_train_ui(id) mod_lda_train_server(id, dtm_reactive, k_optimal_reactive, bd_reactive)mod_lda_train() mod_lda_train_ui(id) mod_lda_train_server(id, dtm_reactive, k_optimal_reactive, bd_reactive)
id |
Shiny module ID. |
dtm_reactive |
Reactive returning the DTM ( |
k_optimal_reactive |
Reactive returning the optimal K ( |
bd_reactive |
Reactive returning the original metadata |
A list of reactive values with the LDA model outputs.
Text Preprocessing Module Server
mod_preprocess_server(id, data_reactive)mod_preprocess_server(id, data_reactive)
id |
Shiny module ID. |
data_reactive |
A reactive expression returning the input |
A list with:
Reactive returning the filtered sparse DTM (dgCMatrix).
Reactive returning the term-frequency data.frame.
Provides UI controls to clean, tokenize, stem, remove stopwords, build a Document-Term Matrix (DTM), and filter sparse terms.
mod_preprocess_ui(id)mod_preprocess_ui(id)
id |
Shiny module ID. |
A Shiny UI element (tagList).
Topic Trend Analysis Module Server
mod_trend_server(id, df_year_topic_reactive, lda_model_reactive)mod_trend_server(id, df_year_topic_reactive, lda_model_reactive)
id |
Shiny module ID. |
df_year_topic_reactive |
Reactive returning a |
lda_model_reactive |
Reactive returning the final LDA model object (used for completeness; labels are derived from data columns only). |
NULL invisibly.
Performs linear regression on topic intensity (mean Gamma) over years and classifies topics as increasing (HOT), decreasing (COLD), or stable (EQUAL).
mod_trend_ui(id)mod_trend_ui(id)
id |
Shiny module ID. |
A Shiny UI element (tagList).
Launches the LDAShiny Shiny application using the golem framework. The function temporarily raises the maximum upload size to 500 MB for the duration of the session and restores the previous value on exit.
run_LDAShiny(max_upload_mb = 500, ...)run_LDAShiny(max_upload_mb = 500, ...)
max_upload_mb |
Maximum file upload size in megabytes (default 500).
Passed to |
... |
Additional named options forwarded to
|
A Shiny app object (invisibly).
if (interactive()) { run_LDAShiny() }if (interactive()) { run_LDAShiny() }