% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Hent_data.R
\name{get_klass}
\alias{get_klass}
\alias{GetKlass}
\title{Fetch Statistics Norway classification data using API}
\usage{
get_klass(
  classification,
  date = NULL,
  correspond = NULL,
  correspondID = NULL,
  variant = NULL,
  output_level = NULL,
  language = "nb",
  output_style = "normal",
  notes = FALSE,
  quiet = TRUE
)

GetKlass(
  klass,
  date = NULL,
  correspond = NULL,
  correspondID = NULL,
  variant = NULL,
  output_level = NULL,
  language = "nb",
  output_style = "normal",
  notes = FALSE,
  quiet = TRUE
)
}
\arguments{
\item{classification}{Number/string of the classification ID/number. (use klass_list() to find this)}

\item{date}{String for the required date of the classification. Format must be "yyyy-mm-dd". For an inverval, provide two dates as a vector. If blank, will default to today's date.}

\item{correspond}{Number/string of the target classification for correspondence table (if a correspondence table is requested).}

\item{correspondID}{ID number of the correspondence table to retrieve. Use as an alternative to correspond.}

\item{variant}{The classification variant to fetch (if a variant is wanted).}

\item{output_level}{Number/string specifying the requested hierarchy level (optional).}

\item{language}{Two letter string for the requested language output. Default is Bokmål ("nb"). Nynorsk ("nn") and English ("en") also available for some classification.)}

\item{output_style}{String variable for the output type. Default is "normal". Specify "wide" for a wide formatted table output.}

\item{notes}{Logical for if notes should be returned as a column. Default FALSE}

\item{quiet}{Logical for whether to suppress the printing of the API address. Default TRUE.}

\item{klass}{Deprecated; use \code{classification} instead.}
}
\value{
The function returns a data frame of the specified classification/correspondence table. Output variables include:
code, parentCode, level, and name for standard lists. For correspondence tables variables include:
sourceCode, sourceName, targetCode and targetName. For date correspondence tables variables include:
oldCode, oldName, newCode and newName. For "wide" output, code and name with level suffixes is specified.
For date ranges, validFromInRequestedRange and validToInRequestedRange give the dates for the classification. Variable ChangeOccured gives the
effective date for classification change in classification change tables.
}
\description{
Fetch Statistics Norway classification data using API
}
\examples{
# Get classification for occupation classifications
head(get_klass(classification = "7"))
# Get classification for occupation classifications in English
head(get_klass(classification = "7", language = "en"))
}
