Title: | QAQC |
---|---|
Description: | PEcAn integration and model skill testing |
Authors: | David LeBauer, Tess McCabe |
Maintainer: | David LeBauer <[email protected]> |
License: | BSD_3_clause + file LICENSE |
Version: | 1.7.3.9000 |
Built: | 2025-03-11 02:30:03 UTC |
Source: | https://github.com/PecanProject/pecan |
This is a fucntion that takes in a table of records and deletes everything in the file. Please do not run this function without 1) Backing Up Bety 2) Checking the the file only contains entries to be deleted.
For more information on how to use this function see the "Pre-release-database-cleanup" script in the 'vignettes' folder or look at the README
cull_database_entries( table = NULL, outdir, file_name = NULL, con, machine_id = NULL, table_name = NULL )
cull_database_entries( table = NULL, outdir, file_name = NULL, con, machine_id = NULL, table_name = NULL )
table |
data frame containing records to be deleted. Specify either this or 'file_name' |
outdir |
Directory from which the file will be read, and where the delete_log_FILE_NAME will be read to |
file_name |
The name of the file being read in. Specify either this or 'table' |
con |
connection the the bety database |
machine_id |
Optional id of the machine that contains the bety entries. |
table_name |
database table from which to delete |
Tempest McCabe
This is a function that returns a dataframe with all of the format entries that have no associated input records.
For more information on how to use this function see the "Pre-release-database-cleanup" script in the 'vignettes' folder or look at the README
find_formats_without_inputs( con, user_id_code = NULL, created_after = NULL, updated_after = NULL, created_before = NULL, updated_before = NULL )
find_formats_without_inputs( con, user_id_code = NULL, created_after = NULL, updated_after = NULL, created_before = NULL, updated_before = NULL )
con |
connection the the bety database |
user_id_code |
Optional parameter to search by user_id |
created_after |
Optional parameter to search by creation date. Date must be in form 'YYYY-MM-DD'. |
updated_after |
Optional parameter to search all entries updated after a certain date. Date must be in form 'YYYY-MM-DD'. |
created_before |
Optional parameter to search by creation date. Can be used in conjunction with created_after to specify a specific window. Date must be in form 'YYYY-MM-DD'. |
updated_before |
Optional parameter to search all entries updated before a certain date. Date must be in form 'YYYY-MM-DD'. |
Tempest McCabe
This is a function that returns a dataframe with all of the input entries that have no associated format records. This is very rare in the database.
For more information on how to use this function see the "Pre-release-database-cleanup" script in the 'vignettes' folder or look at the README
find_inputs_without_formats( con, user_id = NULL, created_after = NULL, updated_after = NULL, created_before = NULL, updated_before = NULL )
find_inputs_without_formats( con, user_id = NULL, created_after = NULL, updated_after = NULL, created_before = NULL, updated_before = NULL )
con |
connection the the bety database |
user_id |
Optional parameter to search by user_id |
created_before , created_after
|
Optional parameter to search by creation date. Date must be in form 'YYYY-MM-DD' |
updated_before , updated_after
|
Optional parameter to search all entried updated after a certain date. Date must be in form 'YYYY-MM-DD' |
Tempest McCabe
This function will return a vector of the column names for a given table(s) in the bety database. Useful for choosing which columns to include in the written-out table.
For more information on how to use this function see the "Pre-release-database-cleanup" script in the 'vignettes' folder or look at the README
get_table_column_names(table, con)
get_table_column_names(table, con)
table |
a table that is output from one of the find_* functions, or a data.frame containing the output from multiple find_* functions. Could also be a vector of table names. |
con |
a connection to the bety database. |
Tempest McCabe
Plot taylor diagram for benchmark sites
new.taylor(dataset, runid, siteid)
new.taylor(dataset, runid, siteid)
dataset |
data to plot |
runid |
a numeric vector with the id(s) of one or more runs (folder in runs) to plot |
siteid |
vector of sites to plot |
This is a function that returns a dataframe with all of the format entries that have no associated input records.
For more information on how to use this function see the "Pre-release-database-cleanup" script in the 'vignettes' folder or look at the README
write_out_table(table, table_name, outdir, relevant_table_columns)
write_out_table(table, table_name, outdir, relevant_table_columns)
table |
a table that is output from one of the find_* functions |
table_name |
name of table |
outdir |
path to folder into which the editable table will be written |
relevant_table_columns |
a list of all columns to keep. ID and table name will be automatically included. |
Tempest McCabe