Skip to contents

Download file from PEPFAR Panorama

Usage

pano_download(
  item_url,
  username,
  password,
  session = NULL,
  dest_path = NULL,
  uncompress = FALSE
)

Arguments

item_url

URL for the item to be downlaoded

username

Username for PEPFAR Panorama Account. Recommend using `pano_user()`

password

Password for PEPFAR Panorama Account. Recommend using `pano_pwd()`

session

Login session, only used within other `pano_extract_*()`

dest_path

Location and name of the destination file

uncompress

If yes, the downloaded zip file will be decompressed. Default is FALSE

Value

file content as binary

Examples

if (FALSE) { # \dontrun{
  library(tidyverse)
  library(grabr)
  library(glamr)

  url <- "https://pepfar-panorama.org/forms/downloads"

  elts <- pano_items(page_html = url,
                     username = pano_user(), password = pano_pwd())

  f_url <- elts %>% filter(type == "file zipfile") %>% pull(path) %>% first()

  pano_download(item_url = url, session = s, dest = "Data") } # }