knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

covidbf

Contribution to https://github.com/reconhub/covid19hub/issues/5

Installation

You can install the released version of covidbf from Github with:

remotes::install_github("ColinFay/covidbf")

How to

library(covidbf)

all_pdf() gets all the pdf from https://www.humanitarianresponse.info/en/op%C3%A9rations/burkina-faso/documents/table/themes/covid-19.

It takes a destination folder + the number of pages minus 1 to scrape (if there are 4 pages, use 3)

dir.create("inst/covidbf")
all_pdf(dest = "inst/covidbf", pages = 3)
fs::dir_tree("inst/covidbf")

extractdata() tries to extract the data from a given pdf (will probably not work on all).

extractdata("inst/covidbf/sitrep_ndeg_41_au_7_avril_2020_1.pdf")
extractdata("inst/covidbf/sitrep_ndeg_42_covid-19_burkina_faso.pdf")
extractdata("inst/covidbf/sitrep_ndeg_43.pdf")
extractdata("inst/covidbf/sitrep_ndeg_44.pdf")


ColinFay/covidbf documentation built on April 13, 2020, 12:37 a.m.