Learn R Programming

ipumsr (version 0.4.5)

ipums_website: Launch a browser window to the ipums website

Description

Takes a DDI (or you can specify a project directly) and a variable name, and makes a best guess at the URL for the variable's page on the IPUMS website. Note that NHGIS and TerraPop do not have accessible pages for variables.

Usage

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

Arguments

x

A DDI or empty (if specifying project)

var

A single variable name in a character vector

project

If not using a DDI (or object with a project attribute) A name of an IPUMS project, one of: "IPUMS-USA", "IPUMS-CPS", "IPUMS-International", "IPUMS-DHS", "ATUS-X", "AHTUS-X", "MTUS-X", "NHIS", "Higher Ed", "NHGIS", or "IPUMS Terra"

launch

If TRUE, launch the website.

verbose

If TRUE, message user if no variable specific websites are available

var_label

Sometimes the variable label is useful for finding the correct URL. Only needed if not passing in the ddi object.

homepage_if_missing

If TRUE, Return homepage if project does not provide variable specific web pages.

Value

The url to the page on ipums.org (silently if launch is TRUE)

Details

Because some variables are constructed during the extract creation process, the URL may not always work unfortunately.

Examples

Run this code
# NOT RUN {
ddi <- read_ipums_ddi(ipums_example("cps_00006.xml"))
ipums_website(ddi, "MONTH", launch = FALSE)

# }
# NOT RUN {
# Launches website
ipums_website(ddi, "MONTH")
# }
# NOT RUN {
# Can also specify project instead of using DDI
ipums_website(var = "RECTYPE", project = "IPUMS-CPS", launch = FALSE)


# }

Run the code above in your browser using DataLab