Description Usage Arguments Value Examples
Get SAIPE data at various geographic levels.
1 2 3 4 5 6 7 8 | saipe(geo, year = 2010, var = c("NAME", "SAEMHI_PT", "SAEPOVRTALL_PT"),
api_key = Sys.getenv("saipe_key"))
saipe_us(...)
saipe_state(...)
saipe_county(...)
|
geo |
(character) One of "us", "state", and "county". |
year |
(numeric) A four-digits value or vector of values. Possible values: 1989, 1993, 1995–2014. |
var |
(character) A string or vector of strings. Possible fields: http://api.census.gov/data/timeseries/poverty/saipe/variables.html |
api_key |
Use |
... |
Pass parameter |
Return a tibble, i.e., modern data frame. If multiple years are specified, it gives a panel dataset.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
saipeAPI::set_api_key("<Your api here>")
# Get national level median household income and poverty rate in 2014
saipeAPI::saipe(geo = "us", year = 2014, var = c("NAME", "SAEMHI_PT", "SAEPOVRTALL_PT"))
# Or
saipeAPI::saipe_us(year = 2014, var = c("NAME", "SAEMHI_PT", "SAEPOVRTALL_PT"))
# Get 2010--2014 data for natinal level, state-level, and county-level
saipeAPI::saipe_us(year = 2010:2014, var = c("NAME", "SAEMHI_PT", "SAEPOVRTALL_PT"))
saipeAPI::saipe_state(year = 2010:2014, var = c("NAME", "SAEMHI_PT", "SAEPOVRTALL_PT"))
saipeAPI::saipe_county(year = 2010:2014, var = c("NAME", "SAEMHI_PT", "SAEPOVRTALL_PT"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.