% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_prep.R
\name{get_zcta_baseline}
\alias{get_zcta_baseline}
\title{Get ACS baseline data for ZCTAs}
\usage{
get_zcta_baseline(variable, year = 2022, zctas = NULL)
}
\arguments{
\item{variable}{ACS variable code (e.g., "B01001_001" for total population)}

\item{year}{ACS year (default: 2022)}

\item{zctas}{Optional character vector of ZCTAs to filter to}
}
\value{
Data frame with columns: zcta, estimate, moe
}
\description{
Fetches ACS 5-year estimates for a specified variable at the ZCTA level using
the Census API via the tidycensus package. Requires a Census API key
(see \url{https://api.census.gov/data/key_signup.html}) and the tidycensus
package to be installed.
}
\examples{
\dontrun{
# get_zcta_baseline() retrieves ACS data via the Census API.
# See vignette("data-preparation", package = "geoDeltaAudit") for a full walkthrough.
pop_data <- get_zcta_baseline("B01001_001", year = 2022)
}
}
