Skip to content

dimagi/dashboard-v2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development Environment

Item Name Version Description
IDE RStudio 0.98.1091 --
Language R 3.1.2 --
Web Framework Shiny 0.12.1 Framework that allows you to create web applications is R.
Specific packages Shinydashboard 0.3.0 CSS framework that allows you to create dashboard looking layouts.
Shinyapps 0.3.63 Library that allows you to deploy applications to shinyapps.io directly from RStudio.
Leaftlet 1.0.0.9999 Create interactive maps with the JavaScript ‘Leaflet’ Library
GoogleVis 0.5.8 R interface to Google Charts
Lubridate 1.3.3 Makes dealing with dates easier
Hosting service Shinyapps.io -- Platform as a Service on which you can deploy Shiny applications.
Github Repository https://github.com/ieda-project/dashboard-v2

Run The Application Locally

  1. Clone the repository

  2. Open RStudio

  3. Set the working directory to the repository

  4. Install all the above mentioned specific packages

  5. Execute the Data Update Procedure (see below)

  6. Open one of the main Shiny App files: server.R, ui.R, global.R

  7. Click on the ‘Run App’ button

  8. Optionally install other missing packages and re-run the application

Data Update Procedure

Download the following exports from CommCareHQ and copy them to the ‘data’ directory located at the root of the repository (create it if non existent).

Name Action
Case Exports
tablet_user (IeDA Dashboard, PBF Migration) Rename to: tablet-users.csv
Form Exports
Child Treatment - Meta Data (IeDA Dashboard) Rename to: child-treatment.csv
Child Visit - Meta Data (IeDA Dashboard) Rename to: child-visit.csv
Enroll Child - Meta Data (IeDA Dashboard) Rename to: enroll-child.csv
Other Exports
List of mobile users
  • Rename column: "data: csps_site_code" to “site_code”
  • Rename column: “data: district” to “district”
  • Keep only columns: username, site_code, district
  • Delete sheet: groups
  • Save as: mobile-users.csv
Locations
  • Keeps only sheet: CSPS
  • Keep only columns: site_code, name, parent_site_code, latitude, longitude
  • Save as: locations.csv

Deploy procedure

The Shiny deployment toolchain is directly integrated with RStudio. Everything can be done through the RStudio UI.

1. Create a shinyapp.io account (only ones)

2. Connect your Shinyapps.io account to RStudio (only ones)

  • Go to Tools > ShinyApps > Manage Accounts

  • Click on Connect

  • Follow instructions

3.Publish Application

  • Open one of the main Shiny App files: server.R, ui.R, global.R

  • Go to Tools > Shiny App > Publish App...

  • Select account

  • Select application (create new if first time)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%