## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment  = "#>",
  eval     = FALSE
)

## ----install------------------------------------------------------------------
# # Using remotes
# remotes::install_github("chrischizinski/tidycreel", subdir = "tidycreel.connect")
# 
# # Or using pak
# pak::pak("chrischizinski/tidycreel/tidycreel.connect")

## ----workflow-overview--------------------------------------------------------
# library(tidycreel)
# library(tidycreel.connect)
# 
# # 1. Connect to a DBI-backed database (SQL Server, DuckDB, SQLite)
# con <- creel_connect(dbi_connection, schema = "creel")
# 
# # -- or connect using a YAML configuration file --
# con <- creel_connect_from_yaml("config/creel.yml")
# 
# # 2. Discover available surveys (API connections only)
# list_creels(con)
# search_creels(con, keyword = "2025")
# 
# # 3. Load validated data and hand off to tidycreel
# counts     <- fetch_counts(con)
# interviews <- fetch_interviews(con)
# 
# design <- creel_design(counts = counts, ...) |>
#   add_interviews(interviews)
# 
# estimate_effort(design)

## ----csv-backend--------------------------------------------------------------
# con <- creel_connect(
#   list(
#     counts     = "data/counts.csv",
#     interviews = "data/interviews.csv",
#     catch      = "data/catch.csv"
#   )
# )
# 
# counts     <- fetch_counts(con)
# interviews <- fetch_interviews(con)

