| Title: | Geyser Data from GeyserTimes.org | 
| Version: | 0.1.9 | 
| Depends: | R (≥ 4.0) | 
| Imports: | jsonlite, lubridate, readr, tools, utils | 
| Suggests: | curl, dplyr, knitr, rmarkdown | 
| Description: | Download geyser eruption and observation data from the GeyserTimes site (https://geysertimes.org) and optionally store it locally. The vignette shows a simple analysis of downloading, accessing, and summarizing the data. | 
| License: | MIT + file LICENSE | 
| URL: | https://github.com/geysertimes/geysertimes-r-package | 
| BugReports: | https://github.com/geysertimes/geysertimes-r-package/issues | 
| VignetteBuilder: | knitr, rmarkdown | 
| NeedsCompilation: | no | 
| Packaged: | 2021-09-08 18:19:08 UTC; spk | 
| Author: | Stephen Kaluzny [aut, cre] | 
| Maintainer: | Stephen Kaluzny <spkaluzny@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2021-09-09 07:00:02 UTC | 
Cleanup Old GeyserTimes Data Files
Description
Removes a particular version of the GeyserTimes data files
that have been download and stored on disk by gt_get_data.
Alternatively, the function will remove all old versions
of the GeyserTimes data files,
keeping only the most recent files.
Usage
gt_cleanup_data(version = NULL, old = FALSE, path = gt_path())
Arguments
version | 
 a character value,
the specific version of the GeyserTimes data files to be removed.
The version number is the date that the files were downloaded,
with the format   | 
old | 
 a logical value, if   | 
path | 
 a character value, the location on disk where the GeyserTimes data files.  | 
Details
Users who regularly download the latest GeysersTimes data may
want to call gt_cleanup_data(old=TRUE) to
clean out old copies of the data.
Value
a character vector, the versions of the data files that were removed.
If no files are removed, NULL is returned.
Author(s)
Stephen Kaluzny <spkaluzny@gmail.com>
See Also
Examples
# see the example in the gt_get_data help file.
Download GeyserTimes Data
Description
Downloads the data from geysertimes.org. Reads the data and creates a tibble object in 'dest_folder'.
Usage
gt_get_data(dest_folder = file.path(tempdir(), "geysertimes"),
  overwrite = FALSE, quiet = FALSE, version = lubridate::today())
Arguments
dest_folder | 
 the location where the binary tibble object should be written. The default is under the current R session's temp directory which will disappear when the session ends.  | 
overwrite | 
 a logical value,
if  | 
quiet | 
 a logical value, if   | 
version | 
 a character string giving the version of the data to download.
This should a date in the form   | 
Details
The data is downloaded from the GeyserTimes archive web site
https://geysertimes.org/archive/ to the tempdir() directory.
The data is then read with readr::read_tsv with appropriate
column types.
The resulting tibble object is then saved as an binary (.rds)
in dest_folder.
Value
a character string giving the full path to the directory where the GeyserTimes data was stored.
Note
Users are encouraged to set dest_folder to gt_path() to save
a persistent copy of the data.
Author(s)
Stephen Kaluzny <spkaluzny@gmail.com>.
See Also
gt_load_eruptions, gt_load_geysers.
Examples
dpath0 <- gt_get_data()  # data saved under tempdir()
dpath1 <- gt_get_data(dest=gt_path())  # data saved under gt_path()
gt_cleanup_data(gt_version())
Load the Geyser Times Data
Description
Loads the Geyser Times data that was previously downloaded by a call
to gt_get_data.
Usage
gt_load_eruptions(path = gt_path(), quiet = FALSE, version = NULL)
gt_load_geysers(path = gt_path(), quiet = FALSE, version = NULL)
Arguments
path | 
 a character string, the local location where the Geyser Times data
has been written.
The default is the local permanent location given by   | 
quiet | 
 a logical value, if   | 
version | 
 a character string giving the version of the Geyser Times data to load.
Calling   | 
Details
Typically, a user would download the data once, with a call to 'gt_get_data(destdir=gt_path())'. Subsequent R sessions can the load this downloaded data with a call to 'gt_load_eruptions()'.
Value
a tibble containing the Geyser Times data with names: (need to decide on appropriate names)
Author(s)
Stephen Kaluzny <spkaluzny@gmail.com>
See Also
gt_get_data
Examples
## Not run: 
tmppath <- gt_get_data()
erupt <- gt_load_eruptions()
## End(Not run)
Path to GeyserTimes Local Data
Description
Returns the path where local GeyserTimes data is stored.
Usage
gt_path(temp = FALSE)
Arguments
temp | 
 a logical value, if   | 
Value
a character string giving the full path where local GeyserTimes data is stored.
Note
Prior to version 0.1.8, the geysertimes package used a location
specified by rappdirs::user_data_dir for storing local GeyserTimes data.
Starting with version 0.1.8, the package now uses the location
tools::R_user_dir("geysertimes", "data").
Author(s)
Stephen Kaluzny <spkaluzny@gmail.com>
See Also
Examples
# The default location for the GeyserTimes data:
gt_path()
Version of GeyserTimes Data
Description
Returns the version of the current GeyserTimes data. This is a character string date in year-mm-dy format.
Usage
gt_version(path = gt_path(), quiet = FALSE, all = FALSE)
Arguments
path | 
 the path to the GeyserTimes data. The default is the suggested location used by 'gt_get_data'.  | 
quiet | 
 a logical value, if   | 
all | 
 list all versions of the GeyserTimes data found, not just the newest.  | 
Value
a character string listing the version(s) of GeyserTimes data stored under 'path'.
Author(s)
Stephen Kaluzny <spkaluzny@gmail.com>
Examples
gt_version()