upstartr0.1.2 package

Utilities Powering the Globe and Mail's Data Journalism Template

begin_processing

Runs the pre-processing step on a startr project.

calc_index

Index values

calc_mode

Calculate mode

clean_columns

Cleans up column names by forcing them into tidyverse style

combine_csvs

Combine CSVs in a directory

combine_excels

Combine Excel files in a directory

convert_str_to_logical

Converts a character vector to logicals

dir_data_cache

Get path within cached data directory.

dir_data_out

Get path within disposable data outputs directory.

dir_data_processed

Get path within processed data directory.

dir_data_raw

Get path within raw data directory.

dir_path

Construct an arbitrary path.

dir_plots

Get path within plots directory.

dir_reports

Get path within reports directory.

dir_scrape

Get path within scrape directory.

dir_src

Get path within src directory

end_processing

Runs the post-processing step on a startr project.

grapes-not_in-grapes

Opposite of %in%

initialize_startr

Initialize startr project

not.na

Opposite of is.na

not.null

Opposite of is.null

read_all_excel_sheets

Combine all sheets in an Excel file

remove_non_utf8

Removes non-UTF-8 characters

render_notebook

Renders out an RMarkdown notebook.

reorder_within

Reorder an x or y axis within facets

run_analyze

Runs the analysis step for a startr project.

run_config

Configures an existing startr project

run_notebook

Runs the notebook rendering step for a startr project.

run_process

Runs the processing step on a startr project.

run_visualize

Runs the visualization step for a startr project.

scale_x_percent

Create a continuous x-axis scale using percentages

scale_x_reordered

Passed after reorder_within to reorder x-axis along facets

scale_y_percent

Create a continuous y-axis scale using percentages

scale_y_reordered

Passed after reorder_within to reorder x-axis along facets

simplify_string

Simplifies strings for analysis

unaccent

De-accents strings

write_excel

Write out an Excel file with minimal configuration

write_plot

Write out a ggplot2 graphic with minimal configuration

write_shp

Write a shapefile to disk

Core functions necessary for using The Globe and Mail's R data journalism template, 'startr', along with utilities for day-to-day data journalism tasks, such as reading and writing files, producing graphics and cleaning up datasets.

  • Maintainer: Tom Cardoso
  • License: MIT + file LICENSE
  • Last published: 2024-01-09