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 College of Medicine, Chulabhorn Royal Academy and the Department of Computer Engineering, King Mongkut's University of Technology Thonburi.
-
Upload data
for analysis into the application for analysis. -
Analysis
for spatial and spatiotemporal epidemiological studies and cluster detection and association with risk factors -
Download results
of analysis from the application.
- Primary: Epidemiologists and Public health researchers
- Secondary: Public health professional 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
There are three installation methods.
This method is suitable for users who already have R and RStudio and prefer not to load the .zip file, especially those who have been using RStudio for a while.
- Install STEHealthApp package by running the following line of code in RStudio:
devtools::install_github("mill-ornrakorn/STEHealth-Application", ref="STEHealthApp")
install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
remotes::install_github("dreamRs/capture")
- After the packages have been installed, type the following in RStudio, and the application window will appear.
library(STEHealthApp)
run_app()
This method is suitable for users who already have R and RStudio and may use RStudio for some time.
-
Clone this repository or download this repository in releases page or this link to download the .zip file.
-
Extract the downloaded file.
-
Open
runShinyApp.R
via RStudio -
Press
Run App
and wait for a moment. The program will automatically install the libraries required* by the application. (*For a list of libraries, please refer to tools section.) -
Now you can use the application.
This method is suitable for users who do not have R and RStudio at all
because in this method we have already installed them all (including R packages) in portable application.
-
Go to this link to download the portable application.
-
Extract the downloaded file.
-
To launch the portable application, simply execute the
\STEHealth_Portable\dist\run.vbs
file without the necessity to view or modify any underlying code. (Note that: If you openrun.vbs
and the application doesn't open or the web application is blank, please pressrun.vbs
several times.) -
Now you can use the application.
The sample data used for case study in this application consists of Thailand shapefile and csv file (Suicide Mortality and Risk Factors in Thailand from 2011 to 2021)
- Thailand shapefile contains 4 files that cannot be missing any of them due to their references to each other: shp, dbf, shx, and prj. These Shapefiles represent provincial boundaries (Level 1).
-
csv file (Suicide Mortality and Risk Factors in Thailand from 2011 to 2021) contains the following 12 columns:
1. province refers to the administrative divisions in Thailand, of which there are a total of 77 provinces.
2. province_id is the number of province starting at from 1 to 77 .
3. year is the number of year from 2011 to 2021.
4. suicide is the number of suicides.
5.Population population in each area.
6-12. 7 covariates: debt, income, poverty, expenditure, homicide crime, property crime and shocking crime.
Suicide Mortality and Risk Factors in Thailand from 2011 to 2021
This manual includes step-by-step instructions on how to use each page of the application. Click here to read more
Software | |
R | Language and environment for statistical computing and graphics |
RStudio | Integrated development environment (IDE) for R |
R-Portable | R portable configures R to work with the PortableApps framework, so that R can be ran from a thumb drive or portable hard drive without leaving artifacts on the computer |
Responsively App | A dev-tool that aids faster and precise responsive web development |
R packages | |
shiny | Makes to build interactive web apps from R |
shinydashboard | Use with shiny to create dashboards |
shinyjs | Perform common useful JavaScript operations in Shiny apps that will greatly improve the apps without having to know any JavaScript |
shinyBS | Adds additional Twitter Bootstrap components to Shiny |
shinyWidgets | Collection of custom input controls and user interface components for 'Shiny' applications. Give your applications a unique and colorful style! |
shinydashboardPlus | Extend 'shinydashboard' with 'AdminLTE2' components. 'AdminLTE2' is a free 'Bootstrap 3' dashboard template |
dplyr | A fast, consistent tool for working with data frame like objects, both in memory and out of memory |
ggplot2 | Creates elegant data visualisations using the grammar of graphics |
leaflet | Create Interactive Web Maps with the JavaScript 'Leaflet' Library |
RColorBrewer | Provides color schemes for maps and other graphics |
rgdal | Provides bindings to Frank Warmerdam's Geospatial Data Abstraction Library (GDAL) |
R-INLA | Performs full Bayesian analysis on generalised additive mixed models using Integrated Nested Laplace Approximations |
spdep | Spatial Dependence: Weighting Schemes, Statistics |
capture | Add a button in Shiny application or R Markdown document to take a screenshot (PNG or PDF) of a specified element. |
bsplus | The Bootstrap framework lets you add some JavaScript functionality to your web site by adding attributes to your HTML tags. |
- Application can support only English.
- Application works effectively on desktops only. We recommend using a screen size of at least 1440x900 pixels for the best viewing experience.
- The operation of the application relies on the system resources of the device it is running on.
- Installation packages must require because an application can not publish to shiny server on the shinyapps.io website. However, we encountered a problem because shinyapps.io only supports packages that are located in CRAN, which is R’s central software repository supported by the R Foundation [2]. Unfortunately, the
R-INLA package
is not included in CRAN, which prevented us from deploying the app to the cloud. We explored alternative deployment options, such as deploying the app on Amazon Web Services (AWS) [3 ,4] and deploying the app on Google Cloud Platform (GCP) using Docker [5 ,6]. However, we encountered issues with some other packages. As a result, we made the decision to create a portable application instead.
-
Paula Moraga (2017), SpatialEpiApp: A Shiny web application for the analysis of spatial and spatio-temporal disease data. Spatial and Spatio-temporal Epidemiology, 23:47-57 DOI: https://doi.org/10.1016/j.sste.2017.08.001
-
CRAN Repository Maintainers. (n.d.). CRAN Repository Policy. Available from: https://cran.r-project.org/web/packages/policies.html
-
Charles Bordet. The Ultimate Guide to Deploying a Shiny App on AWS. Available from: https://www.charlesbordet.com/en/guide-shiny-aws/
-
Venkat Raman. How to host an R Shiny App on AWS cloud in 7 simple steps. Available from: https://towardsdatascience.com/how-to-host-a-r-shiny-app-on-aws-cloud-in-7-simple-steps-5595e7885722
-
Ander Fernández Jauregui. How to put a Shiny app into production. Available from: https://anderfernandez.com/en/blog/put-shiny-app-into-production/
-
Peer Christensen. Dockerizing and Deploying a Shiny Dashboard on Google Cloud. Available from: https://towardsdatascience.com/dockerizing-and-deploying-a-shiny-dashboard-on-google-cloud-a990ceb3c33a
-
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