Learn R Programming

⚠️There's a newer version (0.1.2) of this package.Take me there.

upstartr

Upstartr is a companion package to The Globe and Mail's data journalism template, startr. It contains a series of functions meant to be consumed by the template project, plus additional helpful functions for day-to-day data journalism.

Installation

install.packages('upstartr')

Or, if you want to run a development version, you can install it from GitHub by doing:

devtools::install_github('globeandmail/upstartr')
library(upstartr)

Reference

You can find the full reference manual for upstartr's functions here.

Credits

Spark plug illustration by Murat Yükselir.

Get in touch

If you've got any questions, feel free to send us an email, or give us a shout on Twitter:

Tom Cardoso @tom_cardoso

Copy Link

Version

Install

install.packages('upstartr')

Monthly Downloads

243

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Tom Cardoso

Last Published

February 15th, 2021

Functions in upstartr (0.1.0)

calc_index

Index values
combine_excels

Combine Excel files in a directory
combine_csvs

Combine CSVs in a directory
dir_data_out

Get path within disposable data outputs directory.
calc_mode

Calculate mode
clean_columns

Cleans up column names by forcing them into tidyverse style
begin_processing

Runs the pre-processing step on a startr project.
dir_data_cache

Get path within cached data directory.
convert_str_to_logical

Converts a character vector to logicals
end_processing

Runs the post-processing step on a startr project.
%not_in%

Opposite of %in%
render_notebook

Renders out an RMarkdown notebook.
initialize_startr

Initialize startr project
not.na

Opposite of is.na
remove_non_utf8

Removes non-UTF-8 characters
read_all_excel_sheets

Combine all sheets in an Excel file
simplify_string

Simplifies strings for analysis
dir_reports

Get path within reports directory.
dir_plots

Get path within plots directory.
not.null

Opposite of is.null
dir_scrape

Get path within scrape directory.
dir_data_raw

Get path within raw data directory.
dir_path

Construct an arbitrary path.
dir_src

Get path within src directory
write_shp

Write a shapefile to disk
unaccent

De-accents strings
scale_y_reordered

Passed after reorder_within to reorder x-axis along facets
run_analyze

Runs the analysis step for a startr project.
scale_y_percent

Create a continuous y-axis scale using percentages
run_process

Runs the processing step on a startr project.
reorder_within

Reorder an x or y axis within facets
run_visualize

Runs the visualization step for a startr project.
run_config

Configures an existing startr project
dir_data_processed

Get path within processed data directory.
run_notebook

Runs the notebook rendering step for a startr project.
write_excel

Write out an Excel file with minimal configuration
scale_x_reordered

Passed after reorder_within to reorder x-axis along facets
scale_x_percent

Create a continuous x-axis scale using percentages
write_plot

Write out a ggplot2 graphic with minimal configuration