View source: R/maryland_open_data_api_key.R
maryland_open_data_api_key | R Documentation |
.Renviron
File for Repeated UseThis function will add your Maryland Open Data Portal API key to your .Renviron
file so it can be called securely without being stored
in your code. After you have installed your key, it can be called any time by typing Sys.getenv("MARYLAND_OPEN_DATA_API_KEY")
and can be
used in package functions by simply typing MARYLAND_OPEN_DATA_API_KEY If you do not have an .Renviron
file, the function will create on for you.
If you already have an .Renviron
file, the function will append the key to your existing file, while making a backup of your
original file for disaster recovery purposes.
maryland_open_data_api_key(key, overwrite = FALSE, install = FALSE)
key |
The API key provided to you from Maryland Open Data Portal formatted in quotes. A key be be created after signing up https://imap.maryland.gov/Pages/open-data-portal-signup.aspx |
overwrite |
If this is set to TRUE, it will overwrite an existing MARYLAND_OPEN_DATA_API_KEY that you already have in your |
install |
if TRUE, will install the key in your |
## Not run:
MARYLAND_OPEN_DATA_API_KEY("111111abc", install = TRUE)
# First time, reload your environment so you can use the key without restarting R.
readRenviron("~/.Renviron")
# You can check it with:
Sys.getenv("MARYLAND_OPEN_DATA_API_KEY")
## End(Not run)
## Not run:
# If you need to overwrite an existing key:
MARYLAND_OPEN_DATA_API_KEY("111111abc", overwrite = TRUE, install = TRUE)
# First time, relead your environment so you can use the key without restarting R.
readRenviron("~/.Renviron")
# You can check it with:
Sys.getenv("MARYLAND_OPEN_DATA_API_KEY")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.