calcofi4r 1.3.0
Dataset-driven ERD coloring (stroke-based)
-
cc_erd()stroke-only coloring EntityclassDefs now color the table outline (stroke) instead of the fill, so multi-row entities read cleanly. Thecolorsargument is unchanged. -
cc_erd_color_map()New exported helper that builds thecolorslist forcc_erd()from authoritative table → dataset metadata: single-owner tables take their dataset color, shared/multi-dataset tables take a neutral color, and per-tableoverrideswin. Drives the dataset-source coloring on the schema site (calcofi.io/schema).
calcofi4r 1.1.10
Local data download and table filtering in cc_get_db()
-
local_dataparametercc_get_db(local_data = TRUE)now downloads parquet files to a local cache directory and createsTABLEs instead of remoteVIEWs. Files are only downloaded if missing or ifrefresh = TRUE, making repeated calls idempotent. -
tablesparametercc_get_db(tables = c("species", "ichthyo", ...))filters which tables to load from the catalog. Useful for excluding large tables like CTD data when building app-specific databases.
calcofi4r 1.1.9
Native GEOMETRY storage in cc_get_db()
-
storage_compatibility_version = 'latest'cc_get_db()now uses a named DuckDB driver withautoload_known_extensionsand latest storage format, matching calcofi4db’sget_duckdb_con()pattern. Ensures native GEOMETRY type is used for spatial queries.
calcofi4r 1.1.8
Require DuckDB >= 1.5.1 for native GEOMETRY
-
Requires
duckdb >= 1.5.1Added minimum version constraint to ensure the native built-in GEOMETRY type is available for spatial queries.
calcofi4r 1.1.7
ERD diagrams render as PNG in Quarto via mermaid-cli
-
knit_print.cc_erd()now renders Mermaid diagrams to PNG viammdc(mermaid-cli) at 2x scale with transparent background, saving toknitr::fig_path()for proper Quarto HTML output. Lightbox applies automatically via_quarto.ymlsettings. -
Fallback chain:
mmdc→DiagrammeR::mermaid()htmlwidget → raw mermaid code block.
calcofi4r 1.1.6
New cc_tbl() unified table accessor
-
cc_tbl()New function providing unified access to any CalCOFI database table. Returns lazydplyr::tbl()for non-spatial tables,sfobject for spatial tables (via DuckDBEXCLUDE+ST_AsWKB), and pivoted-widesffor_spatialtable (requireslayerargument). Optionalgeom_colselects alternate geometry columns (e.g.,geom_ctrfor grid centroids).
calcofi4r 1.1.5
-
cc_erd()gains arelsparameter to accept pre-parsed relationship lists inline (as alternative torels_path), matching thecalcofi4dbbuild_relationships_json()list format. -
knit_print.cc_erd()now outputs raw mermaid code blocks for Quarto native rendering (respectsmermaid-format: pngand lightbox settings in_quarto.yml) instead of rendering via DiagrammeR widget.
calcofi4r 1.1.4
- Enable reading of partitioned parquet files, eg table
ctd_measurement(15 GB) partitioned bycruise_key, in online DuckDB for improved performance and scalability.
calcofi4r 1.1.3
- Fixed database functions:
cc_get_db(),cc_list_versions() - Updated vignette “Get started” to using the online DuckDB and latest functions.
- Added deprecation warnings to old functions that made API calls to Postgres database in favor of new direct data querying abilities with the online DuckDB.
calcofi4r 1.1.2
- Added database functions to make views, starting with
casts_extra:cc_make_view(),cc_list_view_templates()
calcofi4r 1.1.1
- Added
cc_read_sf()to read spatial tables in DuckDB connection as sf objects.
calcofi4r 1.1.0
- Highlights DuckDB as the primary data access method
- Quick Start Section - Shows
cc_get_db()as the main entry point - Convenience Functions - Documents the new read functions:
-
cc_read_larvae() cc_read_bottle()cc_read_cast()- With filter examples using dplyr syntax
-
- Version Control Section - Shows how to:
- List versions with
cc_list_versions() - Connect to specific versions
- View release info and notes
- List versions with
- Custom Queries Section - Documents
cc_query()andcc_describe_table() - API Functions - Kept the existing API functions as a secondary option
calcofi4r 0.9.0
Migrated functions.R from CalCOFI Integrated Assessment Shiny App that utilizes a local or remote duckdb of CalCOFI data (rather than an API).
TODO: add
@conceptto functions (to move out of Other heading in Reference) and build vignette (like Get started) demonstrating use of these new functions.
calcofi4r 0.8.1
- Added
cc_db_catalog()to list tables and columns in the database with descriptions (possibly formatted in markdown) by reading from new CalCOFI API endpoints: api.calcofi.io/db_tables, api.calcofi.io/db_columns.
calcofi4r 0.8.0
Removed non-ASCII characters to allow install of package on Windows.
Used
stars::st_as_stars()to useterra::rast()SpatRaster withmapview::mapView()(vs retiredraster::raster()).
calcofi4r 0.7.0
Added interpolation functions
pts_to_rast_idw()andrast_to_contours(). Renamedmap_contours()topts_to_contours_gam()and moved concept from “visualize” to “analyze”.-
Added to
cc_places:- “NOAA Aquaculture Opportunity Areas”
- “BOEM Wind Planning Areas”
- “National Marine Sanctuaries”: “Chumash Proposed Action”
calcofi4r 0.6.0
- Added database connection functions
cc_db_connect()andcreate_index().
calcofi4r 0.5.5
- Fixed nearshore
cc_gridto includesta_pos == 60. Renamedcc_grid_areastocc_grid_zoneswith new categories forsta_shore(“nearshore” OR “offshore”) andsta_pattern(“standard”, “extended”, “historical”) per #4. Updatedcc_placesto have the 6 combinations ofcc_grid_zones.
calcofi4r 0.5.4
- Added
cc_placeswith three categories for places: 1) CalCOFI (Core, Extended, Nearshore, Offshore); 2) Integrated Ecosystem Assessment (California Current); and 3) National Marine Sanctuary (Cordell Bank, Channel Islands, Greater Farallones, Monterey Bay, Olympic Coast). Augmentedcc_grid*with missing cells to reduce slivers when intersecting.
calcofi4r 0.5.3
-
cc_grid_area->cc_grid_areasdata for showing study areas with combinations ofsta_dposnearshore (5), offshore (10) and outside (20); wherearea_dposcan be one of:"5","10","20","5,10","10,20"or"5,10,20"
calcofi4r 0.5.2
- Added
cc_grid,cc_grid_ctrsshowing the CalCOFI station sampling at varying seperation distances of station positions (sta_pos) in the CalCOFI coordinate system from nearshore (5), to offshore (10) to outside the 113 station extended repeated area (20), per Station Positions – CalCOFI}
calcofi4r 0.5.1
- handle defaults with
plot_depth(), streamline headings in article and descriptions in functions
calcofi4r 0.5.0
- Added
plot_depth()and example databottle_temp_depth -
stations_t_degc->bottle_temp_lonlat
calcofi4r 0.3.0
- Added
get_cruises()andget_raster()for reading from the CalCOFI API. - Added
map_raster()andplot_timeseries()for visualizing. - Added “Get started” vignette and README.Rmd -> README.md with example usage
calcofi4r 0.2.0
- Added
get_variables(),get_timeseries()for reading from the API at https://api.calcofi.io
calcofi4r 0.1.0
- Bumped version. Have functions for Analyze (
get_oceano_var_aoi()) and Visualize (plot_timeseries()), plus Data (bottle,dic,stations).