An open API service indexing awesome lists of open source software.

https://github.com/corymccartan/pl94171

Tabulate P.L. 94-171 Redistricting Data Summary Files
https://github.com/corymccartan/pl94171

census r

Last synced: about 1 year ago
JSON representation

Tabulate P.L. 94-171 Redistricting Data Summary Files

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# **PL94171**: Tabulate P.L. 94-171 Redistricting Data Summary Files

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![CRAN status](https://www.r-pkg.org/badges/version/PL94171)](https://CRAN.R-project.org/package=PL94171)
[![R-CMD-check](https://github.com/CoryMcCartan/PL94171/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/CoryMcCartan/PL94171/actions/workflows/R-CMD-check.yaml)
![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/PL94171)

The **PL94171** package contains tools to process legacy format summary
redistricting data files produced by the United States Census Bureau pursuant to
P.L. 94-171. These files are generally available earlier but are difficult to
work with as-is.

## Installation

Install the latest version from CRAN with:

``` r
install.packages("PL94171")
```

You can also install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("CoryMcCartan/PL94171")
```

## Basic Usage

Just need block- or precinct-level data for total and voting-age population by
race? Then `pl_tidy_shp()` is all you need.

```{r}
library(PL94171)
# put the path to the PL 94-171 files here, or use `pl_url()` to download them
pl_path = system.file("extdata/ri2018_2020Style.pl", package="PL94171")
pl_tidy_shp("RI", pl_path)
```

To tabulate at different geographies, or to extract other variables, check out
the [Getting Started page](https://corymccartan.com/PL94171/articles/PL94171.html).