download.Geostreams.Rd
Download Geostreams data from Clowder API
download.Geostreams(outfolder, sitename, start_date, end_date, url = "https://terraref.ncsa.illinois.edu/clowder/api/geostreams", key = NULL, user = NULL, pass = NULL, ...)
outfolder | directory in which to save json result. Will be created if necessary |
---|---|
sitename | character. Must match a Geostreams sensor_name |
start_date, end_date | datetime |
url | base url for Clowder host |
key, user, pass | authentication info for Clowder host. |
... | other arguments passed as query parameters |
Depending on the setup of your Clowder host, authentication may be by
username/password, by API key, or skipped entirely. download.Geostreams
looks first in its call arguments for an API key, then a username and password,
then if these are NULL it looks in the user's home directory for a file named
`~/.pecan.clowder.xml`, and finally if no keys or passwords are found there it
attempts to connect unauthenticated.
If using `~/.pecan.clowder.xml`, it must be a valid PEcAn-formatted XML settings
file and must contain a <clowder>
key that specifies hostname, user, and
password for your Clowder server:
<?xml version="1.0"?> <pecan> <clowder> <hostname>terraref.ncsa.illinois.edu</hostname> <user>yourname</user> <password>superSecretPassw0rd</password> </clowder> </pecan>
# NOT RUN { download.Geostreams(outfolder = "~/output/dbfiles/Clowder_EF", sitename = "UIUC Energy Farm - CEN", start_date = "2016-01-01", end_date="2016-12-31", key="verysecret") # }