The goal of cumulus is to simplify common CHD workflows,by providing utility functions for accessing our cloud infrastructure and other common data resources
You can install the development version of cumulus from GitHub with:
# install.packages("devtools")
devtools::install_github("OCHA-DAP/cumulus")
This is a basic example which shows you how to solve a common problem:
library(cumulus)
## basic example code
containers <- blob_containers()
AzureStor::list_blobs(
container = containers$projects,
dir = "ds-contingency-pak-floods"
)
With convenience access to containers above could easily use {AzureStor}
for flexible reading/downloading of files, but we've provided some convenient wrappers
for reading some basic file types
df <- blob_read(name = "ds-aa-eth-drought/exploration/eth_admpop_2023.xlsx", container = "projects",stage= "dev")
blob_write()
is now available and works almost exactly as blob_read()
. Will add an example soon.
connect to prod postgres db
con_prod <- pg_con(stage = "prod")
con_dev <- pg_con(stage = "dev")
- fieldmaps
gdf_adm1 <- download_fieldmaps_sf("som","som_adm1")
- ENSO/ONI
df_oni <- load_oni()