ipums_website: Launch a browser window to the ipums website

Description Usage Arguments Details Value Examples

View source: R/web_url.r

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

1
2
3
4
5
6
7
8
9
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.

Details

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

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ddi <- read_ipums_ddi(ipums_example("cps_00006.xml"))
ipums_website(ddi, "MONTH", launch = FALSE)

## Not run: 
# Launches website
ipums_website(ddi, "MONTH")

## End(Not run)

# Can also specify project instead of using DDI
ipums_website(var = "RECTYPE", project = "IPUMS-CPS", launch = FALSE)

ipumsr documentation built on July 22, 2020, 1:06 a.m.