% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\name{dashboard_data}
\alias{dashboard_data}
\title{Retrieve Statistics Dashboard observations}
\usage{
dashboard_data(
  indicator_code,
  region_code = NULL,
  parent_region_code = NULL,
  region_level = NULL,
  time = NULL,
  time_from = NULL,
  time_to = NULL,
  cycle = NULL,
  regional_rank = NULL,
  seasonal = NULL,
  stat_name = NULL,
  value_condition = NULL,
  wide = FALSE,
  lang = dash_default("lang", "en"),
  wait = dash_default("wait", 1),
  timeout = dash_default("timeout", 30),
  retries = dash_default("retries", 3)
)
}
\arguments{
\item{indicator_code}{Character vector of 19-digit indicator codes. Names
become aliases. Requests are automatically batched in groups of five.}

\item{region_code}{Optional vector of five-digit Japanese region codes or
three-letter ISO country codes. Requests are automatically batched in
groups of 50.}

\item{parent_region_code}{Optional five-digit parent-region code.}

\item{region_level}{Optional official region-level code.}

\item{time, time_from, time_to}{Optional API time codes. Use \code{"20240100"} for
January 2024, \code{"20241Q00"} for 2024 Q1, \code{"2024CY00"} for calendar year
2024, or \code{"2024FY00"} for fiscal year 2024.}

\item{cycle}{Data cycle: \code{"month"}, \code{"quarter"}, \code{"year"}, or
\code{"fiscal_year"}; API codes 1--4 are also accepted.}

\item{regional_rank}{One of \code{"country"}, \code{"japan"}, \code{"prefecture"}, or
\code{"municipality"}; API codes 1--4 are also accepted.}

\item{seasonal}{\code{"original"} or \code{"seasonally_adjusted"}; API codes 1 and 2
are also accepted.}

\item{stat_name}{Optional partial match for a statistical survey name.}

\item{value_condition}{Optional strict numeric filter such as \code{">100"} or
\code{"<0"}.}

\item{wide}{If \code{FALSE} (default), return normalized long data. If \code{TRUE},
put each indicator or alias in its own column.}

\item{lang}{Response language, \code{"en"} or \code{"jp"}.}

\item{wait}{Requested seconds between automatically batched requests.
Values below one are treated as one when another request is required.}

\item{timeout}{Request timeout in seconds.}

\item{retries}{Number of retries for transient failures.}
}
\value{
A tibble. Long output retains raw codes and labels, an R \code{Date},
numeric \code{value}, original \code{value_raw}, and annotations.
}
\description{
\code{dashboard_data()} retrieves one or more indicators and returns one
indicator-region-time observation per row. The API permits five indicators
and 50 regions per request. Longer vectors are split automatically, with at
least one second between requests.
}
\details{
Named \code{indicator_code} vectors create aliases in the \code{indicator} column and
in wide output, following the style of \code{WDI::WDI()}.
}
\examples{
\dontrun{
population <- dashboard_data(
  indicator_code = c(population = "0201010000000010000"),
  region_code = "00000",
  time_from = "2020CY00",
  time_to = "2024CY00",
  cycle = "year",
  regional_rank = "japan",
  seasonal = "original"
)
}
}
