Skip to contents

Start to clean up download block data Renames columns, drops most, calculates total area.

Usage

census2020_clean(x, cols_to_keep = c("blockfips", "lat", "lon", "pop", "area"))

Arguments

x

data from census2020_read()

cols_to_keep

optional, which (renamed) columns to retain and return

Value

data.table with these columns by default: blockfips lat lon pop area

Details

Renames and drops columns based on names in census_col_names_map and the parameter cols_to_keep, but see census_col_names_map for what could be retained.

Returns table in data.table format.

area is in square meters and is sum of land and water areas.