Pablo-source / Shiny-app-using-COVID-data

Shiny app using bootstrap framework, including Plotly and Leaflet interactive charts and maps. It displays confirmed, recovered and death COVID cases, using data from (JHU CSSE) repository.
3 stars 1 forks source link

Initialise environment for this project using {renv} and tidy up files #16

Closed Pablo-source closed 2 months ago

Pablo-source commented 2 months ago
  1. Using {renv} take a snapshop of this existing Shiny-app-using-COVID-data project. Initialising environment firs using ren::init() and then taking a snapshop using renv::snapshot().

This will ensure we load the right packages and the right version all the time whilst working on this project. Isolating the packages version for this project.

  1. Cleanse existing files in Shiny-app-using-COVID-data folder:
    • Delete following set of files from main repo: • FIXING_LAT_LONG_country_values.Rdata • METRICS_AND_LEAFLETS_DATA.Rdata
Pablo-source commented 2 months ago

Initialising renv for this project

library(renv)

1. Initialise my environment

renv::init()

Then {renv} writes a lock file, this includes all packages required for this specific project. It has created three files:

Inside the /renv folder, there is a script called “activate.R”. This script ensures you have loaded the right packages and the right versions.

The {renv} package creates a library directory, and with it comes an extra git ignore file to ensure I don’t commit all these packages to git and GitHub

image

image

Pablo-source commented 2 months ago

I have also included working on this issue a bit of re-redesign in the existing Shiny Dashboard KPIs. Doing a pull request to include these changes on top of the {renv} creation:

image