% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/harmonise.R
\name{ato_harmonise}
\alias{ato_harmonise}
\title{Harmonise column names in a multi-year ATO panel}
\usage{
ato_harmonise(df)
}
\arguments{
\item{df}{A data frame (typically an \code{ato_tbl} with \code{year}
column from a multi-year call).}
}
\value{
A data frame with harmonised names. \code{ato_tbl} class
and provenance attributes are preserved.
}
\description{
ATO renames columns across annual releases; a stacked panel
from \code{ato_individuals_postcode(year = c("2020-21", "2021-22"))}
may have inconsistent names like \code{total_income} vs
\code{total_income_or_loss}. \code{ato_harmonise()} renames columns to
the first variant in \code{ATO_COL_VARIANTS} so panels are join-ready.
}
\details{
Unknown columns are left alone. Columns that collide after
renaming (because two variants map to the same canonical name)
emit a warning; the first column wins.
}
\examples{
df <- data.frame(postcode = "2000",
                 total_income_or_loss = 100,
                 state_territory = "NSW")
ato_harmonise(df)
}
\seealso{
Other harmonisation: 
\code{\link{ato_crosswalk}()},
\code{\link{ato_deflate}()},
\code{\link{ato_per_capita}()},
\code{\link{ato_reconcile}()},
\code{\link{ato_schema_map}()},
\code{\link{ato_to_taxstats}()}
}
\concept{harmonisation}
