Learn R Programming

geogenr (version 1.0.1)

get_available_years_downloaded: Get available years downloaded

Description

For the name of a geodatabase, returns a vector with the years for which data is available on the local folder.

Usage

get_available_years_downloaded(ua, geodatabase, folder = NULL)

# S3 method for uscb_acs_5ye get_available_years_downloaded(ua, geodatabase, folder = NULL)

Value

A vector of integers.

Arguments

ua

A uscb_acs_5ye object.

geodatabase

A string.

folder

A string.

Details

If the folder is not indicated, it is considered that of the class.

See Also

Other data collection functions: download_geodatabases(), get_available_years_in_the_web(), get_legal_and_administrative_areas(), get_statistical_areas(), uscb_acs_5ye()

Examples

Run this code

folder <- system.file("extdata", package = "geogenr")
folder <- stringr::str_replace_all(paste(folder, "/", ""), " ", "")
ua <- uscb_acs_5ye(folder = folder)
sa <- ua |> get_statistical_areas()

# sa[6]
# [1] "New England City and Town Area Division"

y <- ua |> get_available_years_downloaded(geodatabase = sa[6])

Run the code above in your browser using DataLab