• test-getvals-db(): updated a test
  • data catalog updated
  • 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.
  • data catalog updated
  • ca_example_apireq: additional example added
  • 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 function
  • cvars: updated “ET” to “et” to reflect a change made in the API
  • updated the raster series data catalog (inst/extdata/ca_catalog_rs.csv)
  • ca_getvals_tbl(): added timeout argument
  • ca_getvals_tbl(): added timeout argument to have the ability to increase the amount of time before httr returns a timeout error
  • Added copyright holder and funding organization to the package authors
  • Updated package license from GPL-3 to GPL (>= 3)
  • logo updated - text and border are now green instead of red

Version 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 API
  • ca_stars_mosaic(): new function to mosaic stars rasters
  • ca_preflight(): removed unused quiet argument; errors from ca_apicalls() now grouped and formatted
  • ca_settings(): new function to customize package settings including the text output colors
  • ca_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 added
  • ca_getvals_db(): updated to support Cal-Adapt API requests for Livneh data; omit_col argument added
  • ca_catalog_search(): new function to search the raster series by slug and view properties
  • ca_catalog_rs(): raster series data catalog updated (n=949)
  • ca_read_db(): deprecated and renamed ca_db_read() for a more consistent API
  • ca_db_read(): added lkp_sql and vals_tbl to the attributes of the result
  • ca_db_info() and format.ca_db_info(): enhanced to read SQL statements from sidecar files, save and print multiple SQL statements
  • ca_catalog_fetch(): now exported
  • unit tests: new tests created for downloading rasters and saving data to SQLite; 68 in all
  • five new vignettes: API Requests, Large Queries, Rasters Part I, II, and III
  • ca_catalog_fetch(): trapped an error when tres property is missing
  • ca_apireq(): added element for livneh
  • ca_livneh(): new function to specify a Livneh dataset
  • cvars: expanded to include more VIC variables
  • ca_apicalls(): added additional error checks; support for livneh dataset
  • ca_preflight(): new function to check an API request for errors

The 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 arguments
  • geojsonsf and zip added to imports
  • ca_apicalls(): fixed a bug in the api_url when ignore_spag = TRUE
  • ca_getvals() split into ca_getvals_tbl() and ca_getvals_db(); user_agent added to headers; support for sf objects added
  • ca_lof_sf(): overhauled
  • ca_apicalls(): new method for hashing API calls implemented; now returns a list object
  • aoipreset_idvals: name removed as a field for uniquely identifying counties
  • ca_loc_sf() overhauled
  • package digest added to imports
  • ca_slug() added
  • ca_getvals() completely overhauled - returns a tibble
  • ca_apicalls() added
  • ca_vals2tbl() deleted (no longer needed)
  • aoipreset_idflds: name removed as a field for uniquely identifying counties
  • plot.ca_apireq(): added static argument
  • packages curl, RSQLite, dbplyr, and fastmatch added to imports (i.e., required)
  • updated read.csv calls in ca_catalog_rs() for consistent behavior between R3.x and R4.x.
  • updated ca_getvals() to i) handle aoipreset locations where idval = NULL, and ii) display a progress bar for each location queried
  • Fixed a capitalization bug in ca_loc_pt()
  • Expanding function help in numerous functions
  • Added argument force_day_one to ca_vals2tbl()
  • Added a NEWS.md file to track changes to the package.
  • Numerous little updates
  • Added R notebook caladaptr_intro.Rmd
  • Numerous updates
  • Numerous updates
  • Numerous updates
  • Numerous updates
  • Initial release