Learn R Programming

PL94171 (version 1.2.1)

pl_tidy_shp: 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"), ...)

Value

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

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.

Examples

Run this code
# \donttest{
pl_ex_path <- system.file("extdata/ri2018_2020Style.pl", package = "PL94171")
pl_tidy_shp("RI", pl_ex_path)
# }

Run the code above in your browser using DataLab