knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Contribution to https://github.com/reconhub/covid19hub/issues/5
You can install the released version of covidbf from Github with:
remotes::install_github("ColinFay/covidbf")
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.