Transformation, manipulation and visualization of the data of the implementation of GoData in Guatemala for the tracking of COVID-19 cases and contacts.
Table of Contents
In Guatemala, a pilot project was carried out to trace at home or by phone of COVID-19 cases and contacts using Go.Data. For contacts, the platform's contact follow-ups section was used. While for the cases, the flexibility of the questionnaires was used to implement the follow-ups strategy.
To analyze and report the results of the project, a dashboard was generated from the information of the cases and contacts. In this dashboard, a reports section was also added to report the results of the project. Finally, a tool was added that helps personnel to assign the cases to follow to the different trackers automatically and summarizes the information necessary to carry out the tracing.
Automating the process of obtaining, transforming and updating data on the dashboard was a must. So a script was generated with all the necessary workflow to run the complete ETL process.
You must have a Go.Data user with no access restrictions to use the rastreoConsolidation.R
script in charge of the entire ETL process.
- R
sudo apt-get install r-base
- Clone the repository
git clone https://github.com/Oliversinn/godata-guatemala.git
- Install R packages
cd godata-guatemala Rscript scripts/installPackages.R
- Connect with ShinyApps
rsconnect::setAccountInfo(name="<ACCOUNT>", token="<TOKEN>", secret="<SECRET>")
The only script to run is the rastreoConsolidation.R
. In it, you have to configure the IP or domain, user credentials and IDs of the outbreak and language that you want to use from the Go.Data platform. These fields are represented with "xxxxxxxx" when cloning this repository for security. When running this script it downloads the databases and when transforming them, it saves them in DashboardRastreo/data
so that the dashboard can use them. At the end the scrip publishes the just updated version of the dashboard.
- Run the script
Rscript scripts/rastreoConsolidation.R > logs/rastreoUpdate-$(date +\%F-\%T).log 2>&1
Executions of the script generate a log in the logs/
folder to keep track of the process of each execution. Here's what a successful run looks like:
To see how the dashboard works, you can run it by opening it from RStudio or you can run the following command by adding the path to the dashboard DashboardRastreo
- Run the dashboard
R -e "shiny::runApp('path/to/DashboardRastreo')"