% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transforms.R
\name{wid_tidy}
\alias{wid_tidy}
\title{Tidy a wid_df: decode variable codes and coerce column types}
\usage{
wid_tidy(data, decode = TRUE, country_names = TRUE)
}
\arguments{
\item{data}{A \code{wid_df}.}

\item{decode}{Logical. Add decoded columns. Default \code{TRUE}.}

\item{country_names}{Logical. Join country display names. Default \code{TRUE}.}
}
\value{
A plain \code{data.frame} with \code{year} as integer, \code{value}
as double, and optionally \code{indicator}, \code{series_type},
\code{type_label}, and \code{country_name} columns appended.
}
\description{
Tidy a wid_df: decode variable codes and coerce column types
}
\examples{
d <- data.frame(
  country = "US", variable = "sptinc992j", percentile = "p99p100",
  year = "2020", value = "0.19", age = "992", pop = "j",
  stringsAsFactors = FALSE
)
class(d) <- c("wid_df", "data.frame")
wid_tidy(d, country_names = FALSE)
}
