% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bdsolos.R
\name{load_bdsolos_csv}
\alias{load_bdsolos_csv}
\title{Load a BDsolos CSV export as a list of PedonRecord objects}
\usage{
load_bdsolos_csv(path, sep = NULL, verbose = TRUE)
}
\arguments{
\item{path}{Path to the BDsolos CSV.}

\item{sep}{Field separator. Default \code{","}; BDsolos sometimes
exports with \code{";"} or tab -- pass it explicitly.}

\item{verbose}{If \code{TRUE} (default), prints a one-line summary.}
}
\value{
A list of \code{\link{PedonRecord}} objects. Each pedon
        has \code{site$id} from the profile-id column, the
        taxonomic reference (when present) at
        \code{site$reference_sibcs}, and one horizon row per CSV
        row matching the profile id.
}
\description{
Reads the long-format BDsolos CSV (one row per horizon, with a
profile-id key) and returns a list of \code{\link{PedonRecord}}
objects. Auto-detects the column-name convention via
\code{\link{inspect_bdsolos_csv}} and maps to the soilKey horizon
schema. Texture (argila / silte / areia) is converted from g/kg to
percent (BDsolos canonical unit).
}
\details{
Profile-id columns are auto-detected: looks for any column whose
normalised name matches
\code{"id_perfil|profile_id|cod_perfil|^perfil$|sample_id|^id$"};
falls back to the first column when none match.
}
\seealso{
\code{\link{inspect_bdsolos_csv}},
         \code{\link{download_bdsolos}}.
}
