Learn R Programming

totalcensus (version 0.6.6)

search_geocomponents: Search Geographic Components

Description

Search the code or content of geographic components for geo_comp argument in function read_decennial, read_acs1year, and read_acs5year.

Usage

search_geocomponents(survey, years = NULL, keywords = NULL, view = TRUE)

Arguments

survey

survey type, including "dec" (or "decennial"), "acs1" or "acs5".

years

year or ending year of the survey, can be a single year such as 2010 or a vector like 2014:2016.

keywords

keyword to search in code or description, in the form like "abc def dsdfsa". Rows with all words are returned.

view

display the search result with View if TRUE

Value

A data.table

Details

The most frequently used geographic components are:

00 : all geographic component 01 : urban 43 : rural

Examples

Run this code
# NOT RUN {
# Change view = TRUE (default) to View the returned data.
aaa <- search_geocomponents("decennial", 2010, "urban", view = FALSE)
bbb <- search_geocomponents("acs5", 2011:2015, "43", view = FALSE)

# }
# NOT RUN {
  # view all geocomponents
  search_geocomponents("dec")
  search_geocomponents("acs5")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab