-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
60 lines (45 loc) · 2.01 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{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 <a href='https://corymccartan.com/PL94171/'><img src='man/figures/logo.png' align="right" height="300" style="padding: 12px; height: 300px;" /></a>
<!-- badges: start -->
[![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)
<!-- badges: end -->
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).