| set_ipums_api_key | R Documentation |
Set your IPUMS API key as the value associated with the IPUMS_API_KEY
environment variable.
The key can be stored for the duration of your session or for future
sessions. If saved for future sessions, it is added to the .Renviron
file in your home directory. If you choose to save your key to .Renviron,
this function will create a backup copy of the file before modifying.
This function is modeled after the census_api_key() function
from tidycensus.
Learn more about the IPUMS API in vignette("ipums-api").
set_ipums_api_key(api_key, save = overwrite, overwrite = FALSE, unset = FALSE)
api_key |
API key associated with your user account. |
save |
If |
overwrite |
If |
unset |
If |
The value of api_key, invisibly.
set_ipums_default_collection() to set a default collection.
# Set for single session
set_ipums_api_key("your-api-key-here")
## Not run:
# Save key to .Renviron for future sessions
set_ipums_api_key("your-api-key-here", save = TRUE)
# Overwrite existing key in .Renviron
set_ipums_api_key("your-api-key-here", overwrite = TRUE)
# Remove existing key from .Renviron
set_ipums_api_key("your-api-key-here", unset = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.