README.md

## Watch a DEMO on youTube [![cRew DEMO](https://img.youtube.com/vi/Fobss1YFRFI/0.jpg)](https://www.youtube.com/watch?v=Fobss1YFRFI)

Join the cRew

Lifecycle:
experimental

coRanavirus early-warning (cRew) App tracks Covid-19 / flu like disease symptoms in real-time. The goal of cRew is to map in real-time healthy and symptomatic people. As users enter data about their health status, the app monitors temporal and spatial changes and estimates sudden increases or decreases on local risks. Experimental use only.

User input parameters are based on health (fever, coughing, breathing problems), behavioral (such as going outside, staying home and wearing mask) and location based.

The app is built with shinyMobile & firebase, echarts4r and fireData

About

The app uses Google firebase authentication. This ensures that only authenticated users are able to interact with the app. Firebase authentication and User specific data access is established through the firebase R package from John Coene and setting up firebase Database rules (More information).

Features:

Two variables are used:

access uid in Shiny/firebase app by f$signed_in$response$uid

access the token in Shiny/firebase app by f$signed_in$response$stsTokenManager$accessToken

Example:

 fireData::upload(x = user_inputs, 
                projectURL = databaseURL,
                directory = paste0("fire/",uid()), # Combine your target directory with uid
                token=token())  # Add token information

The second part requires to correctly setup google firebase rules. More information.

For example following rules allow only authenticated users to can read data and only save data under their user-specific folder in the database.

# Example rules to specify that user data can be saved only at a user specific node
# in the database (here 'fire/uid' directory).

{
  "rules": {
    ".read": "auth.uid != null",
    ".write": false,
    "fire":{
      "$uid": {
        ".write": "auth.uid === $uid"
      }
    }
  }
}

cRew App

You can access the app here >> cRew symptom Tracker

The app is for experimental purposes and the disease risk estimation via the app are calculated by the users who enter values thus can be biased.

# install.packages("remotes")
remotes::install_github("korur/cRew")

Set up and run

The code for the app is available as an R package cRew. You can deploy and connect to your own database and run it with your modifications and track other symptoms/diseases.

# Setting up with your firebase database
firebase::create_config(api_key = "yourfirebase apiKey, project_id = "your firebase projectId")
databaseURL <- "your firebase databaseURL"
# Run the app
cRew::run_app()


korur/cRew documentation built on May 25, 2020, 10:19 p.m.