GithubHelp home page GithubHelp logo

ebk13579 / covid19-event-risk-planner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appliedbinf/covid19-event-risk-planner

0.0 1.0 0.0 41.95 MB

COVID19 risk planner R-Shiny application

Home Page: https://covid19risk.biosci.gatech.edu

License: MIT License

R 71.10% JavaScript 18.09% HTML 0.84% Shell 1.06% Dockerfile 2.21% MATLAB 6.71%

covid19-event-risk-planner's Introduction

COVID19 risk planner R-Shiny application

Installation

COVID19 risk planner R-Shiny application is an R-Shiny application that requires R 3.4+, shinyserver, and several R packages. Optionally, you can deploy behind a webserver (Apache or NGINX) to act as the reverse proxy and handle SSL termination.

From Github

git clone [email protected]:appliedbinf/covid19-event-risk-planner.git 
sudo mv covid19-event-risk-planner/COVID19-Event-Risk-Planner /srv/shinyserver/COVID19-Event-Risk-Planner
# Install R and Shiny Server with your distro package manager
# See https://rstudio.com/products/shiny/download-server/ for
# Shiny Server information

Rscript -e "install.packages(c( 'shiny', 'shinythemes', \
'ggplot2', 'ggthemes', 'ggpubr', 'ggrepel', 'dplyr', \
'lubridate', 'matlab'))"

Requirements

  • wget
  • coreutils
  • R 3.4+
  • Shiny
  • shinythemes
  • ggplot2
  • ggthemes
  • ggpubr
  • ggrepel
  • dplyr
  • lubridate
  • matlab (R package)

Crontab entries

We update the current data for the application every hour (with a random delay between 0-700 seconds) and the daily data every 4 hours. While we could load the data live from the API, we want the application to be functional and responsive even if the API is down/slow and it ensures we're not hammering the API if we get a spike of users. The real time daily data doesn't change often enough for this to introduce major delays in reporting.

1 * * * * perl -le 'sleep rand 700' && /srv/shinyserver/COVID19-Event-Risk-Planner/update_current.sh
1 */4 * * * /srv/shinyserver/COVID19-Event-Risk-Planner/update_daily.sh

Example Apache config

<VirtualHost *:80>

ServerName example.com
Redirect permanent / https://example.com/

</VirtualHost>

<VirtualHost *:443>
ServerName example.com
ErrorLog /var/logs/covid19risk/logs/error_log

SSLEngine on
SSLCertificateFile /etc/httpd/ssl/example.com_cert.crt
SSLCertificateKeyFile /etc/httpd/ssl/example.com.key
SSLProxyEngine On
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES
SSLHonorCipherOrder on

ProxyPreserveHost On
ProxyPass / localhost:3432/
ProxyPassReverse / localhost:3432/

</VirtualHost>

covid19-event-risk-planner's People

Contributors

ar0ch avatar seolhalee avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.