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 )
| 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 |
| verbose | If |
| 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 |
The url to the page on ipums.org (silently if launch is TRUE)
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) #> [1] "https://cps.ipums.org/cps-action/variables/MONTH" 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) #> [1] "https://cps.ipums.org/cps-action/variables/RECTYPE"