Package 'PEcAn.qaqc'

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.2
Built: 2024-06-27 20:35:04 UTC
Source: https://github.com/PecanProject/pecan

Help Index


Delete selected records from bety

Description

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

Usage

cull_database_entries(
  table = NULL,
  outdir,
  file_name = NULL,
  con,
  machine_id = NULL,
  table_name = NULL
)

Arguments

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

Author(s)

Tempest McCabe


Find formats in bety that have no input record in bety

Description

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

Usage

find_formats_without_inputs(
  con,
  user_id_code = NULL,
  created_after = NULL,
  updated_after = NULL,
  created_before = NULL,
  updated_before = NULL
)

Arguments

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'.

Author(s)

Tempest McCabe


Find inputs in bety with no format records

Description

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

Usage

find_inputs_without_formats(
  con,
  user_id = NULL,
  created_after = NULL,
  updated_after = NULL,
  created_before = NULL,
  updated_before = NULL
)

Arguments

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'

Author(s)

Tempest McCabe


get_table_column_names

Description

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

Usage

get_table_column_names(table, con)

Arguments

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.

Author(s)

Tempest McCabe


Plot taylor diagram for benchmark sites

Description

Plot taylor diagram for benchmark sites

Usage

new.taylor(dataset, runid, siteid)

Arguments

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


write_out_table

Description

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

Usage

write_out_table(table, table_name, outdir, relevant_table_columns)

Arguments

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.

Author(s)

Tempest McCabe