returnZonalRecordsFromDatabase: Return climate records from SQLite database.

Description Usage Arguments Details Examples

View source: R/returnZonalRecordsFromDatabase.R

Description

The returnZonalRecordsFromDatabase function returns the climate records for specified zones as a dataframe from a SQLite database.

Usage

1
2
returnZonalRecordsFromDatabase(databaseFilePath, databaseTableName, zoneField,
  startDate, endDate, zoneIDs, variables)

Arguments

databaseFilePath

Character string of the file path to the SQLite database to access.

databaseTableName

Character string of the name of the table to access in the database.

zoneField

Character string of the field name describing the unique ID values that define the zones.

startDate

Character string of the first date (format: "yyyy-mm-dd") to acces from the database

endDate

Character string of the last date (format: "yyyy-mm-dd") to acces from the database

zoneIDs

Vector of unique IDs specifying the zones to return

variables

Vector of character strings indicating the variables to return

Details

The function provides an option consistent with the package for returning values from the SQLite database. The "dplyr" package or SQL code can also be used to access climate records from this database in R.

Examples

1
2
3
4
5
6
7
returnZonalRecordsFromDatabase(databaseFilePath  = "C:/USER/Data/Databases/DaymetDB",
                               databaseTableName = "climate_record",
                               zoneField         = "UNIQUE_ID",
                               startDate         = "1980-01-01",
                               endDate           = "1980-12-31",
                               zoneIDs           = c(1, 2, 3, 4, 5),
                               variables         = c("tmin", "tmax", "prcp"))

Conte-Ecology/zonalDaymet documentation built on Aug. 11, 2021, 12:52 a.m.