knitr::opts_chunk$set(echo = TRUE, dev = "CairoPNG", warning = FALSE, message = FALSE) knitr::opts_knit$set(root.dir = here::here())
pacman::p_load( "tidyverse" )
It's a README for this and other analysis projects. It tells you what's in the folder and how best to use it. We're still very early in the process of formalizing our analysis workflow at Blueprint, so watch for changes to the analysis project template.
Because we all need to be on the same page about how projects are organized so that when analysis changes hands for feedback, review, or collaboration, the person jumping in on the project isn't lost. If you have questions, comments, or thoughts on how we could better organize projects, please share them. For the foreseeable future, this project template will be in the "alpha" stage of development, meaning that it can be flexible and responsive to updates.
This is adapted from a number of public resources on R project management, tailored to the specific needs of Blueprint. It is designed to be a version of a research compendium, as described by Marwick et al.
fs::dir_tree()
The data
folder is where all your data should live, unless it lives online and it is preferable to occasionally refresh its contents through an API.
fs::dir_tree("data")
Holds the cached outputs of functions for conducting intensive data loading / manipulation tasks. Manipulate its contents only within functions.
Holds all raw data sources that are not accessible through an API.
Holds final clean datasets used in the analysis work.
The report
folder contains several templated reports that break the work of analyzing data down into manageable chunks.
The specific report titles are suggestions, and the the overall set / number of reports is highly flexible.
Feel free to express yourself here.
fs::dir_tree("report")
The output
folder contains two subfolders tab
and fig
. You should use these subfolders to store any analysis outputs that you're generating to include in word reports, or share as excel spreadsheets.
If you're using any methods drawn from literature, save that literature here as you go along.
The R folder holds all your source code, along with a CONTROL.R file which runs the full data loading, cleaning, and analysis pipeline.
fs::dir_tree("R")
load_data
function01-data-cleaning.Rmd
clean_data
to reflect decisions described in 01-data-cleaning.Rmd
CONTROL.R
and interactively examining the resultsAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.