Learn R Programming

geogenr (version 2.0.1)

get_available_area_years: Get available area years

Description

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)

Value

A vector, area years.

Arguments

ac

An acs_5yr object.

area

A string, area name.

See Also

Other data selection functions: as_acs_5yr_topic(), get_available_area_topics(), get_available_areas(), get_geo_attribute_names(), get_geo_layer.acs_5yr_geo(), get_names_of_other_topics(), get_report_names(), get_subreport_names(), get_topic_name(), select_report(), select_subreport(), select_topic()

Examples

Run this code

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)
ac <- acs_5yr(dir)

files <- ac |>
  unzip_files()

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

Run the code above in your browser using DataLab