This project is to built a dashboard to show figures of the covid-19 crisis, and render it on a map.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You will need to install R and an IDE (RStudio for example) by clicking to the links below.
After installing the softwares, you can clone the repository. Then, you may click on the project to open it (week_X_Covid_19_with_R - Shortcut.Rproj).
Finally, you may try the app:
shiny::run_app()
The data used by the app are in the input folder, but it is used from the repository of John Hopkins university. There are no special need to add data for the first try of the app.
Run the files in the folder tests. Have to be finalised.
There are two type of test :
- Unit test for functions
- Functional test for the whole app
For both type of test, I fixed the maximum date of the data to the value '2020-03-01' in order to have always same figures. For the unit test, some test are written and render a value True or False.
# Test for function df_max_date
source("../Covid_19_R/codes/functions/df_max_date.R",encoding = "UTF-8")
df2 <- df_max_date(df = df$df_grp_all_country, max_date = df$max_date)
max(df2$date) == df$max_date
max(df2$date) == "2020-03-01"
For the functional test, I proceeded twice. The first one was a code to save a picture of the app to compare later with other pictures when the app have been changed. The second way is to write a test text file with several cases.Then, I just try the app ad check the results. Theses tests are in the specification file.
There are several ways to deploy this dashboard :
- use shinyapps.io
- use shiny server
- use shiny shortcut
You may find the production version at :
- on Shinyapps.io
- on my blog
- The shortcut in the production folder.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Quentin Mouton - Initial work - Dataiscoming
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.
This app is inspired from two dashboards :