Skip to contents

Gets the years of the Demographic and Economic Areas that are downloaded and unzipped, available to be queried.

Usage

get_available_area_years(ac, area)

# S3 method for acs_5yr
get_available_area_years(ac, area)

Arguments

ac

An acs_5yr object.

area

A string, area name.

Value

A vector, area years.

Examples


dir <- tempdir()
source_dir <- system.file("extdata/acs_5yr", package = "geogenr")
files <- list.files(source_dir, "*.zip", full.names = TRUE)
file.copy(from = files, to = dir, overwrite = TRUE)
#> [1] TRUE TRUE
ac <- acs_5yr(dir)

files <- ac |>
  unzip_files()

years <- ac |>
  get_available_area_years(area = "Alaska Native Regional Corporation")