Description Usage Arguments Value Examples
Get variable names and descriptions for data sets available through Census Bureau API
1 |
.dbname |
name of the database, one of "sf1", "acs5", "acs1_cd113", "sf1", "sf3", "sf1", "sf3". see dataset censusData for a list |
.year |
year of interest - cf censusData |
vars |
list of variables, if NULL, all are returned in the result |
search |
should the list of variables be interpreted as search terms? |
data frame with following fields:
ID: variable ID
Name: name of the variable
Node: full path to the variable
depth: positive integer number of the path length
... an arbitrary number of variables, one for each level of the path
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
## need internet connection for the following code
## get meta information for the full summary file 1 file for Census 2010
census2010 <- getDBInfo("sf1", 2010)
## all available information on 'total population' from the 2011 American Community Survey
acs <- getDBInfo("acs1_cd113", 2011, "total population")
table(acs$V1.1)
head(subset(acs, depth == 2))
## get complete meta information for the 2011 American Community Survey
acs_all <- getDBInfo("acs1_cd113", 2011)
table(acs_all$depth)
table(acs_all$V1.1) # concept variables
subset(acs_all, V1.1 == "LANGUAGE SPOKEN AT HOME")
gp <- subset(acs_all, V1.1 == "GRANDPARENTS")
table(subset(gp, depth>2)$V2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.