View source: R/api_extract_info.R
get_extract_info | R Documentation |
Retrieve the latest status of an extract request.
get_last_extract_info()
is a convenience function to retrieve the most
recent extract for a given collection.
To browse definitions of your previously submitted extract requests, see
get_extract_history()
.
Learn more about the IPUMS API in vignette("ipums-api")
.
get_extract_info(extract, api_key = Sys.getenv("IPUMS_API_KEY"))
get_last_extract_info(collection = NULL, api_key = Sys.getenv("IPUMS_API_KEY"))
extract |
One of:
For a list of codes used to refer to each collection, see
|
api_key |
API key associated with your user account. Defaults to the
value of the |
collection |
Character string of the IPUMS collection for which to
retrieve extract history. Defaults to the current default
collection, if it exists. See For a list of codes used to refer to each collection, see
|
An ipums_extract
object.
get_extract_history()
to browse past extract definitions
wait_for_extract()
to wait for an extract to finish processing.
download_extract()
to download an extract's data files.
save_extract_as_json()
and define_extract_from_json()
to share an
extract definition.
my_extract <- define_extract_micro(
collection = "usa",
description = "2013-2014 ACS Data",
samples = c("us2013a", "us2014a"),
variables = c("SEX", "AGE", "YEAR")
)
## Not run:
submitted_extract <- submit_extract(my_extract)
# Get latest info for the request associated with a given `ipums_extract`
# object:
updated_extract <- get_extract_info(submitted_extract)
updated_extract$status
# Or specify the extract collection and number:
get_extract_info("usa:1")
get_extract_info(c("usa", 1))
# If you have a default collection, you can use the extract number alone:
set_ipums_default_collection("nhgis")
get_extract_info(1)
# To get the most recent extract (for instance, if you have forgotten its
# extract number), use `get_last_extract_info()`
get_last_extract_info("nhgis")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.