By default, attempts to find a census key stored in an
environment variable named CENSUS_API_KEY.
var.names
A character vector of variables to get,
e.g., c("P2_005N", "P2_006N", "P2_007N", "P2_008N").
If there are more than 50 variables, then function will automatically
split variables into separate queries.
region
Character object specifying which region to obtain data for.
Must contain "for" and possibly "in",
e.g., "for=block:1213&in=state:47+county:015+tract:*".
retry
The number of retries at the census website if network interruption occurs.
Details
This function obtains U.S. Census data via the public API. User
can specify the variables and region(s) for which to obtain data.
References
Based on code authored by Nicholas Nagle, which is available
here.