STEHealth (It stands for Spatiotemporal Epidemiological Health) is a shiny application for analyzing space-time pattern, cluster detection, and association with risk factors of health outcomes, which allows users to import their own data, analyze, and visualize.
This application is part of Spatiotemporal analysis with application development for epidemiological study of suicide mortality: From global perspectives to a case study in Thailand 💀📝 senior project of the Princess Srisavangavadhana Faculty of Medicine, Chulabhorn Royal Academy and the Department of Computer Engineering, King Mongkut's University of Technology Thonburi.
-
Upload datafor analysis into the application — supports both CSV and Excel (.xlsx/.xls) files, or get started instantly with built-in sample datasets (Pollution & Health datasets from the CARBayesST R package). -
Analysisfor spatial and spatiotemporal epidemiological studies, including cluster detection and association with risk factors — the latter reports both the area-level relative risk (how the effect varies by area) and the Overall (region-wide) relative risk, estimated as a fixed effect and directly comparable to region-wide results reported in reference papers such as CARBayesST. -
Download resultsof the analysis directly from the application.
- Primary: Epidemiologists and Public health researchers
- Secondary: Public health professionals and Policy makers
- Papin Thanutchapat; Space-time pattern detection model and association with risk factors for suicide.
- Chiraphat Phoncharoenwirote; Insights information of spatiotemporal epidemiology of suicide mortality and association with risk factors analysis.
- Ornrakorn Mekchaiporn; Application design and development.
- Dr. Unchalisa Taetragool; Department of Computer Engineering, Faculty of Engineering, King Mongkut's University of Technology Thonburi
- Asst. Prof. Dr. Chawarat Rotejanaprasert; Department of Tropical Hygiene, Faculty of Tropical Medicine, Mahidol University
- Asst. Prof. Dr. Peerut Chienwichai; Princess Srisavangavadhana College of Medicine, Chulabhorn Royal Academy
STEHealth Application is fully deployed on the cloud via Hugging Face Spaces. No installation is required. You can access and use the application directly through your web browser from any device.
👉 Launch STEHealth Application Here
Deploying STEHealth to the cloud involved addressing complex dependency challenges between modern R spatial packages and the R-INLA computational engine. We achieved a high-performance, stable cloud deployment on Hugging Face Spaces using the following updated strategy:
- Modern Docker Infrastructure: We utilized the latest
rocker/shinybase image, transitioning to R 4.5+ and Ubuntu 24.04 (Noble). This ensures access to the latest security patches and high-performance system libraries. - Next-Generation Spatial Stack: We migrated from legacy libraries (like
rgdal) to the modernsf(Simple Features) andspdepstack. By leveraging dynamic package management instead of time-locked snapshots, the application stays compatible with current geospatial standards. - Optimized Model Integration: To maintain peak analytical accuracy, we integrate the
R-INLATesting Build, specifically configured to remain compatible with advanced R environments. This bypasses traditionalGLIBCand shared library conflicts (e.g.,libproj) common in complex epidemiological modeling. - Containerized Portability: The entire environment is encapsulated in a custom Docker container, exposing Port 7860 for seamless integration with Hugging Face's infrastructure, ensuring that the local development environment perfectly matches the cloud production state.
The application includes three ready-to-use sample datasets, selectable directly in the app via the Use Sample Data dropdown on the Upload Data page — no need to download or upload anything to try the application. Each is labelled with a badge showing whether it supports Spatial-Temporal or Spatial models, and comes with a View Data Dictionary button describing its columns. The raw files are also available for download, both via the Download sample data (.csv) button in-app and here on GitHub:
Consists of a Thailand shapefile and a csv file (Suicide Mortality and Risk Factors in Thailand from 2011 to 2021).
Covers the Greater Glasgow and Clyde health board in Scotland (271 Intermediate Zones). Contains pm10, jsa (Job Seekers Allowance proportion), and price (average property price) as covariates, with respiratory hospital admissions as the outcome. Supports Spatial-Temporal models (2007-2011).
The same dataset and shapefile as above, filtered to a single year (2007). Since it has no time dimension, this dataset is intended for testing the Spatial model.
🚧 Note: The manual is currently under revision to reflect the latest updates and the new Cloud Deployment on Hugging Face Spaces.
This manual includes step-by-step instructions on how to use each page of the application. Click here to read more
| Hugging Face Spaces | Cloud platform for hosting the machine learning and Shiny web application. |
| Docker | Containerization technology used to create a reproducible environment and manage complex spatial/system dependencies. |
| R | Language and environment for statistical computing and graphics (Version 4.5+, see Deployment Architecture above). |
| shiny | Makes it easy to build interactive web apps straight from R. |
| shinydashboard | Use with Shiny to create dashboards. |
| shinydashboardPlus | Extend shinydashboard with AdminLTE2 components. |
| shinyjs | Perform common JavaScript operations in Shiny apps. |
| shinyBS | Adds additional Twitter Bootstrap components to Shiny. |
| shinyWidgets | Collection of custom input controls and UI components for Shiny applications. |
| bsplus | Adds Bootstrap-powered JavaScript functionality (e.g. tooltips, popovers) to Shiny apps. |
| dplyr | A fast, consistent tool for working with data frame-like objects. |
| ggplot2 | Creates elegant data visualisations using the grammar of graphics. |
| leaflet | Create Interactive Web Maps with the JavaScript 'Leaflet' Library. |
| leaflet.extras | Adds extra functionality to leaflet via additional Leaflet plugins. |
| RColorBrewer | Provides color schemes for maps and other graphics. |
| sf | Simple Features: modern support for spatial vector data, used for shapefile handling (replaces the legacy rgdal). |
| spdep | Spatial Dependence: Weighting Schemes, Statistics. |
| R-INLA | Performs full Bayesian analysis on generalised additive mixed models using Integrated Nested Laplace Approximations. The app uses the Testing Build, kept compatible with the modern R/Ubuntu environment described above (see Deployment Architecture). |
| readxl | Reads Excel (.xls/.xlsx) files, used for the Excel upload option on the Upload Data page. |
| DT | Renders interactive data tables (e.g. the area-level significance table on the Association with Risk Factors tab). |
| capture | Add a button in Shiny application to take a screenshot of a specified element. |
- Auto-Sleep Mode: The application may enter sleep mode after 48 hours of inactivity to save resources. It will automatically wake up and restart upon your next visit, which might take 1-2 minutes to load.
- The application supports only English.
- Recommended screen size is at least 1440x900 pixels for the best viewing experience on desktop browsers.
-
Moraga, P. (2017). SpatialEpiApp: A Shiny web application for the analysis of spatial and spatio-temporal disease data. Spatial and Spatio-temporal Epidemiology, 23, 47–57. https://doi.org/10.1016/j.sste.2017.08.001
-
Lee, D., Rushworth, A., & Napier, G. (2018). Spatio-Temporal Areal Unit Modeling in R with Conditional Autoregressive Priors Using the CARBayesST Package. Journal of Statistical Software, 84(9), 1–39. https://doi.org/10.18637/jss.v084.i09
-
logo of STEHealth application was modified from logo by Ally Hamid on Canva
-
Image in Home page created by pikisuperstar on Freepik
-
Images in Upload Data page, Spatiotemporal Epidemiological Analysis Result page, and About Application created by Katerina Limpitsouni on undraw
-
World icons in Spatiotemporal Epidemiological Analysis Result page created by Freepik on Flaticon
-
World map icons in Spatiotemporal Epidemiological Analysis Result page created by Freepik on Flaticon
-
Document icons in Spatiotemporal Epidemiological Analysis Result page created by smalllikeart on Flaticon
-
Manual cover in STEHealth web application was modified from report cover by Temptackle on Canva


