View source: R/zi_list_zctas.R
zi_list_zctas | R Documentation |
This function returns a vector of GEOIDs that represent ZCTAs in and around states, depending on the method selected. The two methods included described in Details below.
zi_list_zctas(year, state, method)
year |
A four-digit numeric scalar for year. |
state |
A scalar or vector with state abbreviations (e.x. |
method |
A character scalar - either |
Since ZCTAs cross state lines, two methods are used to create these
vectors. The "intersect"
method will return ZCTAs that border
the state selected. In most cases, this will result in more ZCTAs
being returned than are actually within the states(s) named in the
state
argument. Conversely, the "centroid"
method will
return only ZCTAs whose centroids (geographical centers) lie within the
states named. In most cases, this will return fewer ZCTAs than
actually lie within the state selected. Users will need to review
their data carefully and, when using other zipperR
functions,
will likely need to use the include
and exclude
arguments
to finalize the geographies returned.
A vector of GEOIDs representing ZCTAs in and around the state selected.
# Missouri ZCTAs, intersect method
## return list
mo_zctas <- zi_list_zctas(year = 2021, state = "MO", method = "intersect")
## preview ZCTAs
mo_zctas[1:10]
# Missouri ZCTAs, centroid method
## return list
mo_zctas <- zi_list_zctas(year = 2021, state = "MO", method = "centroid")
## preview ZCTAs
mo_zctas[1:10]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.