Building a dataset or compilation

Functions that can be used when building individual datasets and entire compilation.

build_setup_pipeline()

Update the `remake.yml` file with new studies

build_combine()

Combine all the AusTraits studies into the compiled AusTraits database

build_add_version()

Add version information to AusTraits

dataset_update_taxonomy()

Apply taxonomic updates to austraits_raw

dataset_build()

Build dataset

dataset_configure()

Configure AusTraits database object

dataset_process()

Load Dataset

dataset_report()

Build reports for listed datasets

get_schema()

Load schema for an traits.build data compilation (excluding traits)

get_unit_conversions()

Make unit conversion functions

util_get_SHA()

Get SHA string from Github repository for latest commit

util_get_version()

Retrieve version for compilation from definitions

Creating metadata files

Functions that help you create metadata files.

dataset_test()

Test whether specified `dataset_id` has the correct setup

metadata_create_template()

Create a template of file `metadata.yml` for specified `dataset_id`

metadata_check_custom_R_code()

Check the output of running `custom_R_code` specified in the metadata for specified `dataset_id`

metadata_add_traits()

For specified `dataset_id`, populate columns for traits into metadata

metadata_add_contexts()

For specified `dataset_id` import context data from a dataframe

metadata_add_locations()

For specified `dataset_id` import location data from a dataframe

metadata_add_source_bibtex()

Adds citation details to a metadata file for given study

metadata_add_source_doi()

Adds citation details from a doi to a metadata file for a `dataset_id`

metadata_add_substitution()

Add a categorical trait value substitution into a metadata file for a `dataset_id`

metadata_add_substitutions_list()

Add a dataframe of trait value substitutions into a metadata file for a dataset_id

metadata_add_substitutions_table()

Substitutions from a dataframe

metadata_add_taxonomic_change()

Add a taxonomic change into the `metadata.yml` file for a `dataset_id`

metadata_add_taxonomic_changes_list()

Add a list of taxonomic updates into a metadata file for a `dataset_id`

metadata_find_taxonomic_change()

Find `dataset_id`'s with a given taxonomic change

metadata_remove_taxonomic_change()

Remove a taxonomic change from a yaml file for a `dataset_id`

metadata_update_taxonomic_change()

Update a taxonomic change into a yaml file for a `dataset_id`

metadata_exclude_observations()

Exclude observations in a yaml file for a `dataset_id`

dataset_find_taxon()

Find list of unique datasets within compilation containing specified taxa

Reading & writing files

Enable reading and writing of various file types.

read_csv_char()

Read in a csv as a tibble with column types as characters

read_metadata()

Read in a `metadata.yml` file for a study

write_metadata()

Write `metadata.yml` for a study

read_yaml

Read yaml (from package yaml)

write_yaml

write yaml (from package yaml)

write_plaintext()

Export AusTraits version as plain text

Working with outputs

Functions to work with compiled traits.build objects.

plot_trait_distribution_beeswarm()

Beeswarm Trait distribution

check_pivot_duplicates()

Identify duplicates preventing pivoting wider

check_pivot_wider()

Test whether a dataset can pivot wider

db_traits_pivot_longer()

Pivot wide format data into a long format

db_traits_pivot_wider()

Pivot long format data into a wide format

Building a compilation (private)

Private functions that are called in the background when building individual datasets and entire compilation. These are only of interest to developers.

process_add_all_columns()

Add or remove columns of data

process_convert_units()

Convert units to desired type

process_create_observation_id()

Create entity id

process_custom_code()

Apply custom data manipulations

process_flag_excluded_observations()

Flag any excluded observations

process_flag_out_of_range_values()

Flag values outside of allowable range

process_flag_unsupported_characters()

Flag values with unsupported characters

process_flag_unsupported_traits()

Flag any unrecognised traits

process_flag_unsupported_values()

Flag disallowed trait values and disallowed characters

process_format_contexts()

Format context data from list to tibble

process_format_contributors()

Format contributors from list into tibble

process_format_locations()

Format location data from list to tibble

process_generate_id()

Function to generate sequence of integer ids from vector of names Determines number of 00s needed based on number of records

process_generate_method_ids()

Function to generate sequence of integer ids for methods

process_parse_data()

Process a single dataset

process_standardise_names()

Standardise species names

process_taxonomic_updates()

Apply taxonomic updates

process_unit_conversion_name()

Generate unit conversion name

dataset_test_worker()

Test whether specified `dataset_id` has the correct setup

metadata_path_dataset_id()

Path to the `metadata.yml` file for specified `dataset_id`

metadata_user_select_column()

Select column by user

metadata_user_select_names()

Select variable names by user

read_metadata_dataset()

Read the `metadata.yml` file for specified `dataset_id`

write_metadata_dataset()

Write the YAML representation of `metadata.yml` for specified `dataset_id` to file data/dataset_id/metadata.yml

Diverse utility functions

Diverse utility functions for converting and working with various data types.

util_append_to_list()

Add an item to the end of a list

bib_print()

Format BibEntry using RefManageR

util_bib_to_list()

Convert BibEntry object to a list

util_check_all_values_in()

Check values in one vector against values in another vector

util_check_disallowed_chars()

Check values in a vector do not contain disallowed characters

util_df_convert_character()

Convert all columns in data frame to character

util_df_to_list()

Convert dataframe to list

util_extract_list_element()

Extract a trait element from the definitions$traits$elements

util_kable_styling_html()

Format table with kable and default styling for html

util_list_to_bib()

Convert a list of elements into a BibEntry object

util_list_to_df1()

Convert a list with single entries to dataframe

util_list_to_df2()

Convert a list of lists to dataframe

util_replace_null()

Convert NULL values to a different value

util_separate_and_sort()

Split and sort cells with multiple values

util_standardise_doi()

Standardise doi

create_tree_branch()

Format a tree structure from a vector

Functions used when writing reports (private)

Private functions used inside the template reports. These are only of interest to developers.

notetaker_start()

Start note recorder (needs review?)

notetaker_add_note()

Add a note to the note recorder as a new row

notetaker_as_note()

Create a tibble with two columns with note and link

notetaker_get_note()

Return a specific row from notes

notetaker_print_all()

Print all notes

notetaker_print_note()

Print note (needs review?)

notetaker_print_notes()

Print a specific row from notes

notes_random_string()

Create a string of random letters