Description Usage Arguments Value Note Examples
Get state code from the state names.
1 | get_state_code(aqs_api_email, aqs_api_key, state_names)
|
aqs_api_email |
AQS API email |
aqs_api_key |
AQS API key |
state_names |
A vector containing state names. |
A vector of state code per state name provided.
The function uses the AQS API to fetch the data from the API endpoints. Use the following service to register as a user: A verification email will be sent to the email account specified. To register using the email address create and request this link (Replace myemail@example.com in the example with your email address.): (https://aqs.epa.gov/data/api/signup?email=myemail@example.com) You then need to set the email and the key in the .Renviron file as follows, i.e. aqs_api_email=myemail@example.com aqs_api_key=testkey1234
1 2 3 4 5 6 7 8 9 | ## Not run:
aqs_api_email = Sys.getenv('aqs_api_email')
aqs_api_key = Sys.getenv('aqs_api_key')
state_codes <- get_state_code(aqs_api_email = aqs_api_email,
aqs_api_key = aqs_api_key,
state_names = c('California', 'New York'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.