50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

ipumsr (version 0.6.3)

ipums_website: Launch a browser window to an IPUMS metadata page

Description

Using an ipums_ddi object or IPUMS project along with a variable name, guesses the most appropriate URL for the variable's page on the IPUMS website.

Currently, this is only available for Windows operating systems.

Usage

ipums_website(
  x,
  var,
  project = NULL,
  launch = TRUE,
  verbose = TRUE,
  var_label = NULL,
  homepage_if_missing = TRUE
)

Value

The URL to the IPUMS webpage for the indicated project and variable (silently if launch is TRUE)

Arguments

x

An ipums_ddi object. If left empty, project must be specified.

var

Name of the variable to load

project

Name of an IPUMS project. Must be one of: "IPUMS-USA", "IPUMS-CPS", "IPUMS-International", "IPUMS-DHS", "ATUS-X", "AHTUS-X", "MTUS-X", "NHIS", "Higher Ed", "NHGIS"

launch

If TRUE, launch the website.

verbose

If TRUE, produces message if no variable-specific websites are found.

var_label

Variable label for the provided var.

This may be useful if the URL produced by var alone is incorrect.

Only used if specifying project, not x.

homepage_if_missing

If TRUE, return the project homepage if the project does not provide variable-specific web pages.

Details

Note that some IPUMS projects (e.g. NHGIS) do not have variable-specific pages.

The generated URL may not work for variables that are constructed during the extract creation process.

Examples

Run this code
ddi <- read_ipums_ddi(ipums_example("cps_00157.xml"))

if (FALSE) {
# Launch webpage for particular variable
ipums_website(ddi, "MONTH")
}

# Can specify an IPUMS project instead of using an `ipums_ddi` object
ipums_website(var = "RECTYPE", project = "IPUMS-CPS", launch = FALSE)

Run the code above in your browser using DataLab