knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
tsdbr
is designed to create, populate, maintain and query SQLite databases of environmental time series data.
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()
To install the latest version from GitHub repository
# install.packages("remotes") remotes::install_github("poissonconsulting/tsdbr")
Please report any issues.
Pull requests are always welcome.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.