Processing new incoming data and quarto documentation
Closed this issue · 4 comments
Work on script “01 Maps data prep_SHINY.R” script to ingest the new COVID19 data downloaded from URL source website last week. Add new folder at the project level called “Shiny_howto_tutorials”, containing Quarto documents with documentation on how we are building each section of this Shiny dashboard. For example, creating maps with Leaflet package.
Hi @henryygu good morning, I am creating this new issue to process the newly downloaded Covid 19 data and also start a new folder where we will save some Quarto documentation about specific Shiny app design stages for this dashboard.
Fixed @henryygu function to import several .csv files at once, the "file_name" object now refers to the latest files downloaded from URL website:
-We exclude these three files "ncov" because they have date and time format in date columns
-
1/21/20 22:00 1/22/20 12:00 1/23/20 12:00
-
time_series_2019-ncov-Confirmed.csv, time_series_2019-ncov-Deaths.csv, time_series_2019-ncov-Recovered.csv
-
So we read in those files with pattern "time_series_19-covid"
-
file_Name <-c("time_series_covid19_confirmed_global.csv","time_series_covid19_deaths_global.csv",
-
"time_series_covid19_recovered_global.csv")
-
2.1 From downloaded folder "original_data_download
-
Input files with "time_series_19-covid"
getwd()
input_covid <- list.files("original_data_download/", pattern = "time_series_19-covid-.*\.csv")
- [1] "time_series_19-covid-Confirmed_archived_0325.csv" "time_series_19-covid-Deaths_archived_0325.csv"
- [3] "time_series_19-covid-Recovered_archived_0325.csv"
NFILES <- length(input_covid)
- Original file names downloaded from URL contain uppercase file names: "Confirmed,Deaths,Recovered"
file_Name <- c("Confirmed", "Deaths", "Recovered")
for (name in file_Name) {
match_name <- input_covid[grepl(name, input_covid)]
if(length(match_name) > 0) {
assign(paste0("data_",name), read_csv(paste0("original_data_download/",match_name)))
}
}
Also added new folder in script "01_Shiny_app_data_prep.R" to include Quarto documentation for this project @henryygu
- 3.5 Create new folder to store Quarto documentation about designing this Shiny dashboard
- Folder name: "Shiny_howto_tutorials
if (!file.exists("Shiny_howto_tutorials")) {dir.create("Shiny_howto_tutorials")}
Closing issue as it has been completed and merged with main branch