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.
ipums_website(
x,
var,
project = NULL,
launch = TRUE,
verbose = TRUE,
var_label = NULL,
homepage_if_missing = TRUE
)
The url to the page on ipums.org (silently if launch is TRUE
)
A DDI or empty (if specifying project)
A single variable name in a character vector
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"
If TRUE
, launch the website.
If TRUE
, message user if no variable specific websites are available
Sometimes the variable label is useful for finding the correct URL. Only needed if not passing in the ddi object.
If TRUE
, Return homepage if project does not provide variable
specific web pages.
Because some variables are constructed during the extract creation process, the URL may not always work unfortunately.
ddi <- read_ipums_ddi(ipums_example("cps_00006.xml"))
ipums_website(ddi, "MONTH", launch = FALSE)
if (FALSE) {
# Launches website
ipums_website(ddi, "MONTH")
}
# 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