Exract per page locality population tables from a PDF copy of the UNFPA's Sudan population projections from 2009-2020

sd_get_page_locality(
  page,
  startRow,
  period,
  labs = c("total", "male", "female"),
  sep = "_"
)

Arguments

page

An object representing one page text from the UNFPA's Sudan population projections for a locality. This is extracted using the pdf_text() function from the pdftools package

startRow

Numeric value indicating the starting point of actual data from the tables

period

A range of years in 4-year groups starting from 2009 up to 2020

labs

Labels for the population data columns for each reported year; Default to c("total", "male", "female")

sep

Separator to use when labeling columns using labs and reporting year

Value

A data.frame of population data from the given page and specified years