pl_tidy_shp: All-in-one Shapefile Function

View source: R/pl_tidy_shp.R

pl_tidy_shpR Documentation

All-in-one Shapefile Function

Description

Downloads block geography and merges with the cleaned PL 94-171 file.

Usage

pl_tidy_shp(abbr, path, year = 2020, type = c("blocks", "vtds"), ...)

Arguments

abbr

The state to make the shapefile for

path

The path to the PL files, as in pl_read()

year

The year to download the block geography for. Should match the year of the PL files.

type

If "blocks", make a Census block shapefile; if "vtds" make a VTD shapefile.

...

passed on to dplyr::filter(); use to subset to a certain county, for example.

Value

an sf object with demographic and shapefile information for the state.

Examples


pl_ex_path <- system.file("extdata/ri2018_2020Style.pl", package = "PL94171")
pl_tidy_shp("RI", pl_ex_path)



PL94171 documentation built on Sept. 12, 2022, 1:06 a.m.