Learn R Programming

⚠️There's a newer version (0.8.2) of this package.Take me there.

ipumsr

The ipumsr package helps import IPUMS extracts from the IPUMS website into R. IPUMS provides census and survey data from around the world integrated across time and space. IPUMS integration and documentation makes it easy to study change, conduct comparative research, merge information across data types, and analyze individuals within family and community context. Data and services are available free of charge.

The ipumsr package can be installed by running the following command:

install.packages("ipumsr")

Or, you can install the development version using the following commands:

if (!require(devtools)) install.packages("devtools")

devtools::install_github("mnpopcenter/ipumsr")

Learning More

The vignettes are a great place to learn more about ipumsr and IPUMS data:

  • See the ipums vignette for a general introduction

  • For a more detailed look at some of the features, see these vignettes:

    • value-labels
      • Provides guidance for using the value labels provided by IPUMS
    • ipums-geography
      • Provides guidance for using R as GIS tool with IPUMS data
    • ipums-bigdata
      • How to handle large IPUMS data extracts and examples of using the chunked versions of microdata reading functions.
  • Or to see examples of how to work through data from particular projects, see these vignettes:

    • ipums-cps
      • An example of using CPS data with the ipumsr package
    • ipums-nhgis
      • An example of using NHGIS data with the ipumsr package
    • ipums-terra
      • An example of using IPUMS Terra data with the ipumsr package
    • The IPUMS website
      • For more project specific exercises

You can access them from R with the vignette() command (eg vignette("value-labels")).

If you are installing from github and want the vignettes, you’ll need to run the following commands first:

devtools::install_github("mnpopcenter/ipumsr/ipumsexamples")
devtools::install_github("mnpopcenter/ipumsr", build_vignettes = TRUE)

Development

We greatly appreciate bug reports, suggestions or pull requests. They can be submitted via github, on our user forum or by email to ipums@umn.edu

Before contributing, please be sure to read the Contributing Guidelines and the Code of Conduct.

Copy Link

Version

Install

install.packages('ipumsr')

Monthly Downloads

3,403

Version

0.4.5

License

Mozilla Public License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Derek Burk

Last Published

July 21st, 2020

Functions in ipumsr (0.4.5)

ipums_list_files

List files available for analysis in an IPUMS extract
ipums_file_info

Get IPUMS file information
ipums_bind_rows

Bind rows together, but preserve labelled class attributes
dplyr_select_style

Select-style helpers from dplyr
ipums_var_info

Get IPUMS variable information
ipums_shape_left_join

Join data to geographic boundaries
ipums_collect

Collect data into R session with IPUMS attributes
ipums_callback

Callback classes
ipums_conditions

Get IPUMS citation and conditions
lbl_define

Define labels for an unlabelled vector
read_ipums_micro_yield

Read data from an IPUMS extract (in yields)
lbl_relabel

Relabel labelled values
lbl_clean

Clean unused labels
lbl_collapse

Collapse labelled values to labels that already exist
ipums_example

Get path to ipums example datasets
make_ddi_from_scratch

Create DDI structure (for internal use)
read_ipums_codebook

Read metadata from a text codebook in a NHGIS or Terra area-level extract
read_ipums_ddi

Read metadata about an IPUMS extract from a DDI (.xml) file
join_failures

Report on observations dropped by a join
lbl

Make a label placeholder object
ipumsr-package

ipumsr: Read 'IPUMS' Extract Files
ipums_view

View a static webpage with variable information from a IPUMS extract
read_ipums_sf

Read boundary files from an IPUMS extract
read_ipums_micro

Read data from an IPUMS extract
lbl_add

Add labels for unlabelled values
zap_ipums_attributes

Remove all IPUMS attributes from a variable (or all variables in a data.frame)
read_nhgis

Read data from an NHGIS extract
reexports

Objects exported from other packages
ipums_website

Launch a browser window to the ipums website
read_terra_area

Read data from an IPUMS Terra area extract
set_ipums_var_attributes

Add IPUMS variable attributes to a data.frame
read_terra_micro

Read data from an IPUMS Terra microdata extract
read_terra_raster

Read data from an IPUMS Terra raster extract
lbl_na_if

Set labelled values to missing
read_ipums_micro_chunked

Read data from an IPUMS extract (in chunks)