Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.1%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
Read Census Privacy Protected Microdata Files
Basic Info
- Host: GitHub
- Owner: christopherkenny
- License: other
- Language: R
- Default Branch: main
- Homepage: https://christophertkenny.com/ppmf/
- Size: 241 KB
Statistics
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
- Releases: 0
Created about 5 years ago
· Last pushed 11 months ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = '#>',
fig.path = 'man/figures/README-',
out.width = '100%'
)
```
# ppmf
[](https://github.com/christopherkenny/ppmf/actions)
[](https://christopherkenny.r-universe.dev/ppmf)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://CRAN.R-project.org/package=ppmf)

The goal of `ppmf` is to convert Census Privacy Protected Microdata Files into somewhat wider data aggregated to a geographic level.
## Installation
To install the stable version from CRAN, use the following code:
```r
install.packages('ppmf')
```
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages('remotes')
remotes::install_github('christopherkenny/ppmf')
```
## Basics
Load the package:
```{r example, eval = FALSE}
library(ppmf)
```
Download and read data with:
```{r, eval = FALSE}
path <- download_ppmf(dsn = 'filename.csv', dir = 'some/directory', version = '19')
al <- read_ppmf(state = 'AL', path = path)
```
Version '19' reflects the 19.61 finalized parameters used again for the 2020 Census.
For future use, I recommend storing the path to the data for future sessions using:
```{r, eval = FALSE}
add_pmmf19_path(path)
```
Then the path can be recovered with:
```{r, eval = FALSE}
path19 <- Sys.getenv('ppmf19')
```
Once you've read in what you want, you can aggregate it to the right level:
```{r, eval = FALSE}
al <- al |> add_geoid()
blocks <- agg(al)
```
And aggregated data can use the GEOID to merge with shapefiles:
```{r, eval = FALSE}
library(dplyr) # to clean up the data
shp <- tigris::blocks('AL', year = 2010) |>
select(GEOID10, geometry) |> rename(GEOID = GEOID10)
shp <- shp |> left_join(blocks, by = 'GEOID')
# always clean shp!
shp[is.na(shp)] <- 0
```
---
For users with the newest package version, there is an added dependency on [`censable`](https://christophertkenny.com/censable/), which allows for an easier workflow. If you've used the `add_pmmf*_path()` workflow suggested, you don't even need to supply the paths!
This will not just read the `ppmf` data, it will merge it with 2010 Census populations (by major race/ethnicity grouping) and add the corresponding geometries.
```{r, eval = FALSE}
al <- read_merge_ppmf('AL', level = 'block', versions = '19')
```
Owner
- Name: Christopher T. Kenny
- Login: christopherkenny
- Kind: user
- Location: Cambridge, MA
- Company: Harvard University
- Website: https://www.christophertkenny.com
- Twitter: chris_t_kenny
- Repositories: 78
- Profile: https://github.com/christopherkenny
Redistricting and rstats. Harvard University, PhD Candidate, Department of Government. Cornell '19.
GitHub Events
Total
- Push event: 4
Last Year
- Push event: 4
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Christopher Kenny | c****4@c****u | 37 |
Committer Domains (Top 20 + Academic)
cornell.edu: 1
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 176 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: ppmf
Read Census Privacy Protected Microdata Files
- Homepage: https://github.com/christopherkenny/ppmf/
- Documentation: http://cran.r-project.org/web/packages/ppmf/ppmf.pdf
- License: MIT + file LICENSE
-
Latest release: 0.2.1
published 11 months ago
Rankings
Forks count: 28.8%
Dependent packages count: 29.8%
Stargazers count: 31.7%
Dependent repos count: 35.5%
Average: 41.1%
Downloads: 80.0%
Maintainers (1)
Last synced:
11 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- censable * imports
- dplyr * imports
- magrittr * imports
- readr * imports
- rlang >= 0.4.11 imports
- stringr * imports
- tibble * imports
- tidyr * imports
- zip * imports
- roxygen2 * suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite