Description Usage Arguments Details Value
Setup directories for a typical DataHaven project
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
dir |
String: path to directory in which new files will be written. Default: '.' |
input_data |
Create a directory Standard use: data from some outside source to be analyzed in this project. |
output_data |
Create a directory Standard use: data written after analysis done in this project, generally in formats that can still be used for analysis and visualization (csv, rds) rather than formats for distribution (I usually add a folder |
fetch_data |
Create a directory Standard use: a place to dump data as it comes in from API calls, queries, batch file downloads, etc. |
analysis |
Create a directory Standard use: main analysis scripts, both notebooks and .R scripts. |
prep_scripts |
Create a directory Standard use: scripts use to prep or reshape data or documents, e.g. creating formatted spreadsheets for a client, making metadata, prepping to post to data.world, formatting for a website, bulk rendering parameterized Rmarkdown documents. |
plots |
Create a directory Standard use: plots, either for in-house use or outside distribution. |
format_tables |
Create a directory Standard use: spreadsheets–probably written by a script in |
drafts |
Create a directory Standard use: separating the more EDA-centered notebooks from notebooks used for drafting writing. Also a good place to keep files that have been edited in outside software (.docx, etc). |
utils |
Create a directory Standard use: utility scripts and miscellaneous files, e.g. logo images, snippets of data, lists of colors to use. |
addl |
A string vector of any additional directories to create. Default: NULL |
gitblank |
Logical: whether to write a blank placeholder file in each new directory to force git tracking, even without yet having folder contents. Default: TRUE. If FALSE, empty directories will not be tracked by git. |
This sets up a typical project directory structure that we use for many projects at DataHaven. It will write directories at the specified path, but it will NOT overwrite any directories that already exist. You'll have the option to cancel before anything is written.
Returns nothing, but prints paths to newly created directories.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.