R/format_csv.R

#' Generates a formatted dataframe of vaccination campaigns from a csv
#' ready to be translated to population level vaccination coverage.
#' 
#' @param csv.in this is the raw csv to be input, should follow the specified order documented.
#' @param shp2 This is a second administrative division shapefule that contains all the countries in the raw csv.
#' @examples
#' format_csv(rawdatacsv,africa_adm2)
#' @export

format_csv<-function(csv.in,shp2){
  
  print('Clean and split campaigns into GADM1 and GADM2')
  cleaned<-cleansplit(csv.in)
  
  print('Process and format GADM1 and GADM2 separately')
  GADM1formated<-GADM1prep(cleaned$GADM1)
  GADM2formated<-GADM2prep(cleaned$GADM2)
  
  print('Combine')
  combGADMfin<-format_comb(GADM1formated,GADM2formated)
  
  print('Finished')
  combGADMfin
  
}
arranhamlet/popvac_package documentation built on May 10, 2019, 1:48 p.m.