#' Cleans UN WPP interpolated to single age group data then subsets to desired ISO's
#' @param countryiso This is a vector of the ISO codes for all countries you want to generate populations for.
#' @examples
#' csv_clean("AGO")
#' @keywords internal
csv_clean<-function(countryiso){
#This data is provided internally by the package
wpp_int<-global_annual_age
#Create ISO for countries and subset to country
ISOsubset<-iso_translate$ISO_num[which(as.character(iso_translate$ISO_3) %in% countryiso)]
wppISO<-wpp_int[which(wpp_int$LocID %in% ISOsubset),]
wppISO$ISO<-sapply(1:length(wppISO$LocID), function(x){
iso_translate$ISO_3[which(iso_translate$ISO_num %in% wppISO$LocID[x])]
})
wppISO<-wppISO[,-which(names(wppISO) %in% "Pop80_100")]
wppISO
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.