Description Usage Arguments Details Examples
View source: R/returnZonalRecordsFromDatabase.R
The returnZonalRecordsFromDatabase
function returns the climate records for specified zones as a dataframe from a SQLite database.
1 2 | returnZonalRecordsFromDatabase(databaseFilePath, databaseTableName, zoneField,
startDate, endDate, zoneIDs, variables)
|
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 |
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.
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.