Skip to content

Installation

Karan Bhanot edited this page Dec 2, 2019 · 1 revision

Technologies Required

R

The latest version of R can be installed from the official website https://cran.rstudio.com/. The app requires R 3.6.0+

RStudio

RStudio can be installed directly from the official website https://rstudio.com/. The app requires RStudio 1.1.4+

Libraries Required

MortalityMinder requires the following external libraries:

"lubridate", "tidyr", "dplyr", "stringr", "janitor", "purrr", "textshape", "stats", 
  "magrittr", "zoo", "textshape", "forcats", "randomForest", "cluster", "shiny", 
"shinythemes", "shinyWidgets", "shinydashboard", "r2d3", "RColorBrewer", "viridis", 
"shinyjs", "grid", "htmltools" "ggplot2", "plotly", "RUnit", "mapproj", "maps", "leaflet",
 "devtools", "urbnmapr"

These can be installed by running the script init/Librarian.R

This may take several minutes

Curl fix

The curl() and curl_download() functions provide highly configurable drop-in replacements for base url() and download.file(). If your Library installations are not working, try running init/Curl_fixer.R to ensure the correct versions are installed. You can also copy the code directly to Console:

if (!require("devtools", character.only = T)) {
  install.packages("devtools")
  require("devtools", character.only = T)
}

if (!require("curl", character.only = T)) {
  install_version("curl", version = "4.0", repos = "http://cran.us.r-project.org")
  require("curl", character.only = T)
}

Local Setup

To run a local instance of the application, follow the steps below:

  1. Clone the repository to your local setup.
  2. Open RStudio and navigate to your local repository location in the RStudio files tab.
  3. Open app.R and select Run App on the top-right corner of the code window.