Skip to contents

given data.table with blockid column, get state abbreviation of each (function might not be used)

Usage

state_from_blockid_table(dt_with_blockid)

Arguments

dt_with_blockid

(or any data.table with either blockid or bgid column)

Value

vector of ST info like AK, CA, DE, etc.

Examples

x = sample(blockpoints$blockid, 3)
state_from_blockid_table(blockpoints[blockid %in% x, ])[]
mapfast(blockpoints[blockid %in% x, ])

table(state_from_blockid_table(testoutput_getblocksnearby_10pts_1miles))
# unique(state_from_latlon(testpoints_10)$ST) # slow

all.equal(state_from_blockid(x), state_from_blockid_table(blockpoints[blockid %in% x, ]))