USAID-OHA-SI / mindthegap

Munges and returns estimates from UNAIDS data.
https://usaid-oha-si.github.io/mindthegap/
Other
4 stars 0 forks source link

Incorporate data in Releases instead of GDrive #18

Closed achafetz closed 1 year ago

achafetz commented 2 years ago

Leverage the use of GitHub releases to store the publicly available UNAIDS data in an accessible way.

Based on Tan Ho's presentation at RStudio Conf, posted updated data to releases (not being indexed and not counting against repo file size).

We can post data in different formats and download easily as well. Ideally posting in a compressed format for quick upload/download using piggyback

new_tag <- "v2022.07.27"
pb_new_release(tag = new_tag)

glamr::temp_folder()

readr::write_csv(df_est, file.path(folderpath_tmp, "UNAIDS_HIV_Estimates.csv"))
readr::write_csv(df_est, file.path(folderpath_tmp, "UNAIDS_HIV_Estimates.csv.gz"))
saveRDS((df_est, file.path(folderpath_tmp, "UNAIDS_HIV_Estimates.rds"))

readr::write_csv(df_tt, file.path(folderpath_tmp, "UNAIDS_TestTreat.csv"))
readr::write_csv(df_tt, file.path(folderpath_tmp, "UNAIDS_TestTreat.csv.gz"))
saveRDS((df_tt, file.path(folderpath_tmp, "UNAIDS_TestTreat.rds"))

#upload multiple files
list.files(folderpath_tmp, full.names = TRUE) %>% 
  pb_upload(tag = new_tag)

#download a specific file
pb_download(file = "UNAIDS_HIV_Estimates.csv.gz",
            dest = glamr::si_path("path_downloads"))

@karishmas26 @tessam30

tessam30 commented 2 years ago

@achafetz - I think we'll still need a gdrive version of the UNAIDS data for the Tableau products. These use hit the google sheet as a data source.

achafetz commented 2 years ago

I think that's completely reasonable. Continue leveraging the current model for Tableau (maybe in the future DDC 🙄) and we leverage GH releases for R.