Description Usage Arguments Value Examples
View source: R/geo_neighbours.R
Calculates a neighborhood matrix from a list of geoids which correspond to either tract of block group ids for a given year. Alternatively calculates neighborhood matrix for a sf data frame of polygons
1 2 3 4 5 6 7  | 
GEOIDs | 
 Character vector of GEOIDs of either tracts or block groups  | 
year | 
 The year, or endyear, of the ACS sample or Census. 2012 through 2018 are available for ACS and 2000 and 2010 for Census. Defaults to 2010.  | 
geoid_sf | 
 Alternative specification where an sf object is supplied and neighborhoods are calculated directly from that object  | 
matrix | 
 Logical whether to return a matrix rather than data frame.  | 
queen | 
 Logical, use queen algorithm of adjacency rather than rook.  | 
data frame or matrix indicating adjacency with logical values
1 2  | # get neighbors of all 2010 tracts from Wake county North Carolina
geo_neighbors(get_decennial_race("NC", "Wake")$GEOID)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.