Skip to contents

Harvesting Data

Fetch and cache the live USADA sanctions data

get_sanctions_data()
Get USADA sanctions data
get_prohibited_association()
Get USADA prohibited-association data
update_sanctions_data()
Refresh the cached USADA sanctions data

Wrangling Data

Clean and tidy the raw sanctions text, dates, and sports

process_text()
Process raw data
clean_dates()
Clean sanction dates
clean_sports()
Clean/tidy USADA sports
split_cols()
Separate column into multiple columns
add_match_col()
Create column with matched value (base R)
pivot_term_long()
Parse string into individual terms

Classifying Substances

Classify sanctions against the WADA prohibited substance list

classify_wada_substances()
Classify banned WADA substances
reclass_substance()
Re-classify a specific WADA substance
make_regex()
Create a Regular Expression Pattern
create_word_boundary()
Create a regular expression with word boundaries

Visualizing Substances

ggplot2 theme for package visualizations

theme_ggp2g()
ggplot2 theme (doping data)

Utilities

File export/import helpers and operators

export_data()
Export data object to path
export_extdata()
Export data to inst/extdata/ or inst/extdata/raw
get_recent()
Return the most recent modification date
get_recent_file()
Return the most recent data file in folder
clip_top_file()
Copy the path to top data file in extdata/ folder on the clipboard
dtstamp()
Insert date/time stamp
verify_inst_path()
Verify inst/ path
`%nin%`
Not in (not-in operator for R.)
`%otherwise%`
null-coalescing operator. See purrr for details.