Skip to contents

All functions

access_db_connect()
Establish a connection to an MS Access database
add_hard_coded_value()
Add a hard-coded column with a specific value to the dataframe
andes_db_connect()
Establish a connection to the andes database
andes_str_to_oracle_date()
Convert andes datetime string form DB to Oracle date format
andes_str_to_oracle_datetime()
Convert andes datetime string form DB to Oracle datetime format
check_cols_contains_na()
Checks if all dataframe cols named in the col_names contain NA This is useful to validate if a dataframe can be written to a DB table (where some columns values cannot be null)
check_columns_present()
Make sure the columns listed in col_names are present in the dataframe
check_numeric_columns()
Make sure the columns listed in col_names have numeric (or NA) values
check_other_columns()
Make sure no other columns than the ones listed in col_names are present in the dataframe
cleanup_text()
Cleanup text form ANDES to play nice in Oracle
cols_to_numeric()
Convert all dataframe cols named in the col_names to a numeric value
create_new_access_db()
Creates a new MS Access database file
format_cod_descrip_capt()
Format COD_DESCRIP_CAPT
format_cod_esp_gen()
format the cod_esp_gen column
format_cod_secteur_releve()
Format COD_SECTEUR_RELEVE
format_cod_source_info()
Format COD_SOURCE_INFO
format_cod_strate()
Format COD_STRAT
format_cod_tech_mesure_long()
Format COD_TECH_MESURE_LONG
format_cod_typ_etat()
Format COD_TYP_ETAT
format_cod_typ_heure()
Format COD_TYP_HEURE
format_cod_typ_long()
Format COD_TYP_LONG
format_cod_typ_mesure()
format COD_TYP_MESURE
format_cod_typ_panier()
Add the formated COD_TYP_PANIER column to the dataframe This is currently hard-coded to Panier doublé TODO: implement different types depending on chosen gear code, for exmaple:
format_coordinates()
Format coordinates for TRAIT_MOLLUSQUE
format_date_deb_projet()
Format DATE_DE_PROJET
format_date_fin_projet()
Format DATE_FIN_PROJET
format_date_hre_trait()
Format dates for TRAIT_MOLLUSQUE
format_date_trait()
Format dates for TRAIT_MOLLUSQUE
format_epibiont()
Formated COD_COUVERTURE_EPIBIONT column to the dataframe
format_no_mollusque()
Format NO_MOLLUSQUE
format_no_station()
Format NO_STATION
format_seq_pecheur()
Format SEQ_PECHEUR
format_zone()
Format ZONE
generate_sql_insert_statement()
Generate a SQL statement
get_access_table_properties()
get database table properties
get_biometrie_petoncle()
Gets get_biometrie_petoncle (formatted results)
get_biometrie_petoncle_db()
Gets capture_mollusc_db (raw database results)
get_capture_mollusque()
Gets capture_mollusque (formatted results)
get_capture_mollusque_db()
Gets capture_mollusc_db (raw database results)
get_engin_mollusque()
Gets engin_mollusc (formatted results)
get_engin_mollusque_db()
Gets engin_mollusc_db (raw database results)
get_epibiont()
This fetches the specimen-level coverage data and coverts it to an average set-level metric in accordance to the legacy Oracle database.
get_freq_long_mollusque()
Gets freq_long_mollusque (formatted results)
get_freq_long_mollusque_db()
Gets freq_long_mollusque_db (raw database results)
get_legal_collection_names()
Get a list of legal collection names as a filter for get_biometrie_petoncle()
get_projet_mollusque()
Gets fishing projet_mollusque (formatted results)
get_projet_mollusque_db()
Gets fishing projet_mollusque (raw database results)
get_ref_choices()
Builds a list of legal choices (descriptions) for get ref key
get_ref_key()
Get the reference key corresponding to a value (usually from the Oracle / MSAccess reference database)
get_strate()
Get the strate from reference
get_trait_mollusque()
Gets trait_mollusque (formatted results)
get_trait_mollusque_db()
Gets trait_mollusque_db (raw database results)
init_cod_serie_hist()
Add the cod_serie_hist to the whole dataframe This value is not present in ANDES so it will have to be specified here. Run this without desc_serie_hist_f to get a list of choices.
is_andes_time_str_dst()
Verify is the ANDES dattime string is in daylight savings time
left_join()
a merge that preserves row and column order
lookup_cod_serie_hist()
Lookup entry in Oracle
lookup_cod_source_info()
Lookup COD_SOURCE_INFO
parse_andes_datetime()
Convert ANDES UTC time string and converts it to a POSIXct object
sanitize_sql_value()
Sanitize value to SQL statement
strip_alphabetic()
This function removes alphabetic characters from a string
to_oracle_coord()
Convert coordinate to Oracle format
validate_capture_mollusque()
Perform database validation checks on the dataframe
validate_engin_mollusque()
Perform database validation checks on the dataframe
validate_freq_long_mollusque()
Perform database validation checks on the dataframe
validate_projet_mollusque()
Perform database validation checks on the dataframe
validate_set_result()
Validate set result consistency
validate_trait_mollusque()
Perform database validation checks on the dataframe
write_capture_mollusque()
Write to Access file
write_engin_mollusque()
Write to Access file
write_freq_long_mollusque()
Write dataframe to Access file
write_projet_mollusque()
Write to Access file
write_trait_mollusque()
Write dataframe to Access file