Skip to contents

Downloads new data since the last update and appends it to the database. Designed to be run on a schedule (e.g., daily or weekly via cron/GitHub Actions).

Usage

incremental_update(
  db_path = "inst/extdata/irish_buoys.duckdb",
  lookback_hours = 48
)

Arguments

db_path

Path to DuckDB database file

lookback_hours

Number of hours to look back for safety (default: 48) This ensures we don't miss data due to delays in ERDDAP updates

Value

List with update statistics

Examples

if (FALSE) { # \dontrun{
# Perform incremental update
result <- incremental_update()

# Check what was updated
print(result$summary)
} # }