Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/elipousson/ipumseasyr

Easy access to IPUMS data using {ipumsr}
https://github.com/elipousson/ipumseasyr

ipums ipums-api r-package

Last synced: 27 days ago
JSON representation

Easy access to IPUMS data using {ipumsr}

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

# ipumseasyr

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)

The goal of ipumseasyr is to ease access to the [IPUMS](https://www.ipums.org/) data (especially [NHGIS](https://www.nhgis.org/) data) with easy-to-use wrappers for the [`{ipumsr}`](https://tech.popdata.org/ipumsr/) package.

## Installation

You can install the development version of ipumseasyr from GitHub:

``` r
# pak::pkg_install("elipousson/ipumseasyr")
```

## Example

```{r example}
library(ipumseasyr)
```

Define an extract without submitting it:

```{r define_nhgis_ts_extract}
state_population_extract <- define_nhgis_ts_extract(
year = seq(1990, 2010, by = 10),
tables = "CL8",
geography = "state"
)

state_population_extract
```

Get an extract (using an extract from my extract history):

```{r get_nhgis_ts_data}
nhgis_extracts <- get_nhgis_extract_history()

withr::with_tempdir({
state_population <- get_nhgis_ts_data(
extract = nhgis_extracts[[1]]
)

dplyr::glimpse(state_population)
})
```