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.
ipums_website(
x,
var,
project = NULL,
launch = TRUE,
verbose = TRUE,
var_label = NULL,
homepage_if_missing = TRUE
)
The URL to the IPUMS webpage for the indicated project and variable
(silently if launch is TRUE
)
An ipums_ddi
object. If left empty, project
must be specified.
Name of the variable to load
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"
If TRUE
, launch the website.
If TRUE
, produces message if no variable-specific websites
are found.
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
.
If TRUE
, return the project homepage if the
project does not provide variable-specific web pages.
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.
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