make_years_for_trend: Get years available in Census API

Description Usage Arguments Details Value Examples

Description

Convenience function for splitting a span of years based on availability in the Census ACS API

Usage

1
make_years_for_trend(start_year, end_year)

Arguments

start_year

A four-digit integer for the first year in the desired time period

end_year

A four-digit integer for the last year in the desired time period

Details

The Census ACS API is currently only available for 2012 onward. This makes it tricky to pull data for a longer period, such as 2010 to 2015. The type column in the returned dataframe is useful for iterating over years that must be downloaded as csv files, versus those available from the API.

Value

Returns a tbl

Examples

1
years <- make_years_for_trend(2010, 2015)

CT-Data-Haven/acsprofiles documentation built on June 13, 2019, 8:20 a.m.