Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/christopherkenny/baf


https://github.com/christopherkenny/baf

Last synced: 28 days ago
JSON representation

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%'
)
```

# baf

[![R-CMD-check](https://github.com/christopherkenny/baf/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/christopherkenny/baf/actions/workflows/R-CMD-check.yaml)
[![baf status
badge](https://christopherkenny.r-universe.dev/badges/baf)](https://christopherkenny.r-universe.dev/baf)

The goal of `baf` is to provide lightweight block assignment (and equivalence) files from the US Census Bureau.

## Installation

You can install the development version of baf like so:

``` r
pak::pak('christopherkenny/baf')
```

## Example

The workhorse function for `baf` is the `baf()` function.

```{r}
library(baf)

baf(state = 'NM', year = 2024, geographies = 'cd')
```

## Cache

By default, `baf` loads files to a temporary directory.
To retain files across sessions, set the `cache_to` argument to a directory of your choosing.
You can also set `options(baf.use_cache = TRUE)` to create a user-level cache that can persist across projects.