sight_read_design_recaps() and sight_read_design_recaps_id() retrieve design recaps aggregated by analysis unit from the /aerial-surveys/designs/analysis-unit-recaps endpoint. Returns one row per DAU x survey type x bio year with subunit counts (all_subunits, stratified_subunits, selected_subunits, surveyed_subunits).
spdgt.sight 0.0.5.1
sight_optimize_design() and sight_optimize_design_id() gain confidence (default 0.90) and design_overrides parameters, forwarded to the sightability API /optimize endpoint. The response tibble now includes variance decomposition columns (samp_var, sight_var, mod_var, total_var, error_bound, confidence) when the API returns them (#XX).
spdgt.sight 0.0.5.0
Breaking: All functions renamed to follow sight_{verb}_{resource}() convention for consistent IDE auto-complete. No deprecated aliases — update all call sites. Verb groups: sight_read_* (data access), sight_fit_* (model fitting), sight_prep_* (data preparation), sight_optimize_* (survey design), sight_sample_* (sampling), sight_calc_* (calculations). See rename-plan.md for the full mapping.
spdgt.sight 0.0.4.0
Breaking:sight_fit_id() and sight_data_prep_id() now return flat tibbles with context columns (species_id, bio_year, analysis_unit_id, spatial_focus, survey_type_id, model_id) in every row instead of nested list structures. This requires coordinated deployment with spdgt.sightability >= 0.0.4.3, which changed the underlying API response shape.
sight_entries(), sight_design(), and sight_design_entries() now have detailed @returns documentation listing all returned columns.
spdgt.sight 0.0.3.7
All API-calling functions now accept dry_run to print the HTTP request without sending it and ... to forward verbosity/timeout to spdgt.auth. Named variants forward these via ... to their _id counterpart.
Removed the api_call() error-wrapping layer; HTTP errors now surface directly from spdgt.auth/httr2 with the API’s own error messages.
sight_estimates() and sight_surveys() now expose pages as an explicit parameter instead of hardcoding it, preventing “formal argument matched by multiple actual arguments” errors when passing pages through ....
spdgt.sight 0.0.3.6
sight_estimates() now accepts a parameter argument (human-readable name) instead of parameter_id. The ID is resolved via lkup_ipm_param_id(). The parameter_id argument remains available on sight_estimates_id().
sight_model() removed the survey_type_id argument. Use species and survey_type (name-based) instead.
Removed unused httr2 from Imports, eliminating an R CMD check NOTE.
sight_data_id() and sight_surveys_id() fixed bare column references that caused R CMD check NOTEs about undefined global variables.
spdgt.sight 0.0.3.4
sight_design_entries_id(), sight_design_id(), and sight_entries_id() now return properly-typed empty tibbles when the API returns zero results, completing the consistent empty-result handling across all GET functions.
Expanded test suite from 318 to 340 tests, adding coverage for sight_data_prep() and empty-result handling.
spdgt.sight 0.0.3.3
sight_betas_id(), sight_datasheet_columns_id(), sight_model(), sight_survey_cols_id(), and sight_vcov_id() now return properly-typed empty tibbles (with expected column names and types) when the API returns zero results, preventing downstream column-access errors.
sight_check_api() removed last use of <<- superassignment in build_results_().
Expanded test suite from 279 to 299 tests, improving code coverage from 84.5% to 92.2%.
spdgt.sight 0.0.3.2
Fixed sight_sample() debug vignette test which used a fabricated payload missing geometry and proportions, causing 500 errors. The vignette now fetches a real payload from the Counts API.
spdgt.sight 0.0.3.1
All API-calling functions now wrap errors with user-friendly messages that distinguish authentication failures, permission errors, missing resources, invalid requests, server errors, and network connectivity issues.
sight_check_api() redesigned to use clean helper functions instead of <<- superassignment, with the same user-facing behavior.
sight_data_id(), sight_data_prep_id(), sight_diagnostics_id(), sight_fit_id(), sight_optimize_id(), sight_summary_id(), and sight_wong_id() now validate that required parameters are not NULL, producing clear error messages instead of cryptic downstream failures.
Added GitHub Actions CI workflow (R-CMD-check.yaml) with coverage reporting.
Expanded test suite from 168 to 277 tests, covering all previously untested functions including sight_entries, sight_design, sight_betas, sight_vcov, sight_wong, sight_summary, sight_diagnostics, sight_datasheet_columns, sight_check_api, and the new api_call() / check_required() helpers.
spdgt.sight 0.0.3.0
Fixed sight_sample() which was passing a parameters argument to api_post() that isn’t supported. The sampling method is now included in the request body so Plumber can extract it correctly.
spdgt.sight 0.0.2.9
Fixed phantom NA groups when estimating by GMU. The design table lacks management_unit_id, so the full join of entries and design left design-only rows with NA. Now backfills management_unit_id from the subunit lookup after the join in both sight_data() and sight_data_id().
spdgt.sight 0.0.2.8
Fixed vignette function names — replaced all obsolete sight_read_* calls with current names (sight_surveys, sight_entries, sight_design, etc.).
Fixed sight_sample() call signature in debug vignette.
Fixed reading-survey-data vignette to use sight_surveys() for summaries and corrected column name from "total_count" to "total".
spdgt.sight 0.0.2.7
Fixed stratum filter bug: sight_entries() was using ids$stratum_id instead of ids$strata_id, causing the stratum filter to be silently ignored when using the name-based wrapper.
Fixed sight_betas() to forward the id parameter to sight_betas_id() (was silently dropped).
Clarified sight_fit() documentation to distinguish name-based vs ID-based variant parameters.
spdgt.sight 0.0.2.6
Added sight_estimates() / sight_estimates_id() for retrieving IPM estimates with parameter and model name joins from the lookup cache.
Added sight_datasheet_columns() / sight_datasheet_columns_id() for retrieving datasheet column definitions.
spdgt.sight 0.0.2.5
Exposed all valid includes for sight_model(): covarBins, covarCategories, betaVars, countCategories, covarBetas, and aerialSurveys, matching the API’s ModelController supported includes.
spdgt.sight 0.0.2.3
Bumped version with minor internal changes.
spdgt.sight 0.0.2.2
sight_surveys_id() now returns a properly-typed empty tibble when the API returns no results, preventing a downstream dplyr::distinct() crash.
sight_surveys() now delegates compact handling to sight_surveys_id().
spdgt.sight 0.0.2.1
Added sight_wong() / sight_wong_id() client for the /fit/wong endpoint.
Added parse_summary_response_() internal helper for tidy summary/diagnostics output.
Added compact parameter to sight_surveys().
spdgt.sight 0.0.2.0
Breaking: Renamed all data access functions from sight_read_* to sight_* (e.g., sight_read_betas -> sight_betas, sight_read_data -> sight_data).
Removed sight_read_summary() (replaced by sight_surveys()).