knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Lifecycle: experimental R build status Codecov test coverage License: MIT R-CMD-check

tsdbr

tsdbr is designed to create, populate, maintain and query SQLite databases of environmental time series data.

Utilisation

library(tsdbr)
conn <- ts_create_db(":memory:")
options(tsdbr.conn = conn)
ts_add_parameter("discharge", "cms")
ts_add_site("Niagara Falls")
ts_add_station("S1", "discharge", "Niagara Falls", "hour")
data <- data.frame(
  Station = "S1", DateTime = ISOdate(2000, 9, 1, 0:23),
  Recorded = 0:23 - 2,
  stringsAsFactors = FALSE
)
ts_add_data(data)
data <- ts_get_data(
  start_date = as.Date("2000-09-01"),
  end_date = as.Date("2000-09-02")
)
print(head(data))
ts_plot_data(data)
ts_disconnect_db()

Installation

To install the latest version from GitHub repository

# install.packages("remotes")
remotes::install_github("poissonconsulting/tsdbr")

Contribution

Please report any issues.

Pull requests are always welcome.

Code of Conduct

Please note that the tsdbr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



poissonconsulting/tsdbr documentation built on June 30, 2023, 3:02 a.m.