% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/afsp.R
\name{load_afsp_pedons}
\alias{load_afsp_pedons}
\title{Load Africa Soil Profiles (AfSP) v1.2 as PedonRecord objects}
\usage{
load_afsp_pedons(
  afsp_dir,
  max_n = NULL,
  countries = NULL,
  wrb_codes = NULL,
  verbose = TRUE
)
}
\arguments{
\item{afsp_dir}{Directory containing the extracted AfSP DBase
tables (\code{AfSP012Qry_Profiles.dbf},
\code{AfSP012Qry_Layers.dbf}).}

\item{max_n}{Optional integer; take a random sample of this size
from the classifiable profiles.}

\item{countries}{Optional character vector of ISO country codes to
keep (e.g.\ \code{c("MW", "ET", "TZ")}).}

\item{wrb_codes}{Optional character vector of WRB 2006 RSG codes
to keep (e.g.\ \code{c("VR", "FR", "AC")}).}

\item{verbose}{Print progress.}
}
\value{
A list of \code{\link{PedonRecord}} objects.
}
\description{
Reads the AfSP DBase tables shipped inside \code{AF-AfSP1.2.zip}
(downloadable from
\url{https://files.isric.org/public/afsp/AF-AfSP1.2.zip}) and
converts each profile + its horizons to a soilKey
\code{\link{PedonRecord}}. Filters to profiles with a populated
WRB 2006 RSG code (i.e.\ classifiable; AfSP has ~7000 of these of
the total 18,533).
}
\section{References}{

Leenaars, J. G. B., van Oostrum, A. J. M., & Ruiperez Gonzalez, M.
(2014). Africa Soil Profiles Database, Version 1.2. ISRIC Report
2014/01. ISRIC -- World Soil Information, Wageningen.
Project page:
\url{https://isric.org/projects/africa-soil-profiles-database-afsp}.
}

