pl_retally | R Documentation |
Applies a block crosswalk to a table of block data using areal interpolation. That is, the fraction of land area in the overlapping region between old and new blocks is used to divide the population of the old blocks into the new.
pl_retally(d_from, crosswalk)
d_from |
The data frame to process. All numeric columns will be re-tallied. Integer columns will be re-tallied with rounding. Character columns will be preserved if constant across new block geometries. |
crosswalk |
The crosswalk data frame, from |
All numeric columns will be re-tallied. Integer columns will be re-tallied with rounding. Character columns will be preserved if constant across new block geometries.
Blocks from other states will be ignored.
A new data frame, like d_from
, except with the geometry column
dropped, if one exists. New geometry should be loaded, perhaps with
tinytiger::tt_blocks()
.
crosswalk = pl_crosswalk("RI", 2010, 2020) RI_2010 = pl_tidy_shp("RI", pl_url("RI", 2010), 2010) pl_retally(RI_2010, crosswalk)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.