add_geoid | R Documentation |
Adds the GEOID identifier common to spatial census data sets, such as those loaded by tigris. This allows for easier merging or aggregation by a single variable.
add_geoid(
ppmf,
state = TABBLKST,
county = TABBLKCOU,
tract = TABTRACT,
block_group = TABBLKGRP,
block = TABBLK,
level = "block"
)
ppmf |
tibble of ppmf data |
state |
Column in ppmf with state (fips) ID. Default is |
county |
Column in ppmf with county (fips) ID. Default is |
tract |
Column in ppmf with tract ID. Default is |
block_group |
Column in ppmf with block group ID. Default is |
block |
Column in ppmf with block ID. Default is |
level |
Geographic level to write the GEOID for. Options are block (default), block_group, tract, and county. |
input data ppmf with added column GEOID
data(ppmf_ex)
ppmf_ex <- ppmf_ex |> add_geoid()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.