NEWS.md
ca_getvals_db()
, ca_getvals_tbl()
: trapped an error where a preset AOI falls outside the LOCA grid (e.g., Farallon Islands HUC10 watershed)ca_preflight()
: modified to render messages differently in non-interactive contexts (i.e., Rmarkdown)format.ca_apireq()
, print.ca_apireq()
: modified how output appears in RMarkdown documents (color codes removed)bbox_resize()
: utility function to resize a bounding box object (returned by sf::st_bbox()
) by passing either a scaling factor or a fixed offset; used internally but exported for convenience.ca_getvals_tbl()
, ca_getrst_stars()
, ca_getvals_db()
: added .call = F
to several calls of stop()ca_loc_pt()
: added error checks for NAs and duplicate coordinates in coords
ca_loc_aoipreset()
: added error check for NAs and duplicate values in idval
ca_slug()
: added error check for NAs and duplicate values in slug
ca_apicalls()
: Added duplicate location check when loc_check = TRUE
; stopwarn() split off into separate functioncvars
: updated “ET” to “et” to reflect a change made in the APIca_getvals_tbl()
: added timeout
argumentca_getvals_tbl()
: added timeout
argument to have the ability to increase the amount of time before httr returns a timeout errorVersion 0.6.1 is a fairly significant update, with several new and improved functions especially for downloading and working with rasters, SQLite databases, improved preflight testing for API requests, data catalog searching, customizing messages with a package-wide color scheme, and making function names more consistent. Also 5 vignettes on API Requests, Large Queries, and Rasters Part I, II, and III.
caladaptr
now depends on R version 3.6.ca_getrst_stars()
: modified to save additional attribute data in the sidecar files (e.g., gcm, scenario, climate variable, etc.); progress bar disabled if quiet = TRUE (e.g., for rmd); normalize_path
argument added; overwrite
argument added; sidecar_write
argument renamed sidecar
ca_read_stars()
: deprecated (renamed ca_stars_read()
)ca_stars_read()
: replacement of ca_read_stars()
, updated to accept a vector of TIF files names (instead of one), and return a list of stars objects; read_sidecar
argument renamed sidecar
; added proxy
argument which imports the TIFs as stars proxy objects (i.e., disk pointers)ca_stars_index
: new function to create an index for a list of stars rasters downloaded by ca_getrst_stars
and bundled into a list with ca_read_stars
ca_stars_6d()
: combines stars rasters for different climate variables, GCMs, and emissions scenarios into a single 6-dimensional raster (with x, y, and date being the other three dimensions)ca_biggeom_blocks()
: new function that takes a large geom and returns a simple feature data frame of rectangular blocks each one small enough to download TIFFs from the Cal-Adapt APIca_stars_mosaic()
: new function to mosaic stars rastersca_preflight()
: removed unused quiet
argument; errors from ca_apicalls() now grouped and formattedca_settings()
: new function to customize package settings including the text output colorsca_apicalls()
: ignore_spag
renamed spag_check
; new argument check_for
; preflight
renamed pf
ca_getvals_tbl()
: modified how ca_apicalls() is called, omit_col
argument addedca_getvals_db()
: updated to support Cal-Adapt API requests for Livneh data; omit_col
argument addedca_catalog_search()
: new function to search the raster series by slug and view propertiesca_catalog_rs()
: raster series data catalog updated (n=949)ca_read_db()
: deprecated and renamed ca_db_read()
for a more consistent APIca_db_read()
: added lkp_sql
and vals_tbl
to the attributes of the resultca_db_info()
and format.ca_db_info()
: enhanced to read SQL statements from sidecar files, save and print multiple SQL statementsca_catalog_fetch()
: now exportedca_catalog_fetch()
: trapped an error when tres property is missingca_apireq()
: added element for livnehca_livneh()
: new function to specify a Livneh datasetcvars
: expanded to include more VIC variablesca_apicalls()
: added additional error checks; support for livneh datasetca_preflight()
: new function to check an API request for errorsca_db_info()
: returned result is no longer invisibleca_getvals_tbl()
: shiny_progress
argument added to show a progress bar in Shiny appsca_getvals_db()
: added write_sidecar
argument - writes a sidecar file next to the SQLite fileca_read_db()
: imports a SQLite file created by ca_getvals_db()
, returning a remote tibbleshiny
added to importsThe highlight of this update is improvements to ca_getrst_stars()
. You can now download cropped rasters for user-defined sf data frames as well, points, and preset areas of interest. Rasters can also be masked to the polygon boundary.
ca_getrst_stars()
: added support sf data frames and point locations; added mask
and merge_geom
argumentsgeojsonsf
and zip
added to importsca_apicalls()
: fixed a bug in the api_url when ignore_spag = TRUE
ca_example_apireq()
: updated example #1ca_locagrid_geom()
: zip file download source changed to github.com/ucanr-igis/caladaptr-res/…ca_aoipreset_geom()
: zip file download source changed to github.com/ucanr-igis/caladaptr-res/…ca_getrst_stars()
: addedca_read_stars()
: addedca_getvals_tbl()
, ca_getvals_db()
and ca_apicalls()
: removed format=json parameter in favor of accept_json()ca_resp_check()
: deleted (functionality absorbed into ca_getvals_tbl()
& ca_getvals_db()
)ca_lof_sf()
: trap added for multipoint features (which the Cal-Adapt server treats as individual points, hence they should not be used)ca_apicalls()
: removed gson_fn_base from the list object returnedca_example_apireq()
: addedca_locagrid_geom()
: addedca_aoipreset_geom()
: temporary zip file(s) are now deleted when no longer needed; source directory for zipfiles on GitHub changed from ‘aoipreset_geoms’ to just ‘geoms’; check for internet connection addedplot.ca_apireq()
: locagrid
argument added to overlay the loca gridplot.ca_apireq()
: default symbol size tweaked for point featuresca_getvals()
split into ca_getvals_tbl()
and ca_getvals_db()
; user_agent added to headers; support for sf objects addedca_lof_sf()
: overhauledca_apicalls()
: new method for hashing API calls implemented; now returns a list objectaoipreset_idvals
: name
removed as a field for uniquely identifying countiesca_loc_sf()
overhauleddigest
added to importsca_slug()
addedca_getvals()
completely overhauled - returns a tibbleca_apicalls()
addedca_vals2tbl()
deleted (no longer needed)aoipreset_idflds
: name
removed as a field for uniquely identifying countiesplot.ca_apireq()
: added static
argumentcurl
, RSQLite
, dbplyr
, and fastmatch
added to imports (i.e., required)ca_catalog_rs()
for consistent behavior between R3.x and R4.x.ca_getvals()
to i) handle aoipreset locations where idval = NULL
, and ii) display a progress bar for each location queriedca_loc_pt()