generated from AgrDataSci/template-repo-data-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8896992
Showing
8 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# History files | ||
.Rhistory | ||
.Rapp.history | ||
|
||
# Session Data files | ||
.RData | ||
.DS_Store | ||
|
||
# User-specific files | ||
.Ruserdata | ||
|
||
# Example code in package build process | ||
*-Ex.R | ||
|
||
# RStudio files | ||
.Rproj.user/ | ||
|
||
|
||
# Temporary files created by R markdown | ||
*.utf8.md | ||
*.knit.md | ||
|
||
# R Environment Variables | ||
.Renviron | ||
|
||
# ClimMob API key | ||
token/api-key.txt | ||
*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Template analysis workflow | ||
|
||
This is a template for R projects for data analysis. For repositories with other goals please look at other templates (if any). Create your new repository using this template, then clone the repo and change the name of the existing R-project file .Rproj or create a new R-project (https://bookdown.org/daniel_dauber_io/r4np_book/starting-your-r-projects.html) | ||
|
||
Suggestions/comments on this template or for new templates are welcome! | ||
|
||
## Project-oriented workflow | ||
|
||
Why we use project-oriented workflow? Here is the answer (https://www.tidyverse.org/blog/2017/12/workflow-vs-script/). From these recommendations the only thing that I think we can skip is using the package "here". | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# data | ||
|
||
All data used for the analysis must be here. Try your best to keep all the files that you need for the analysis in this folder. If you have big files, please document and provide a persistent link to access the data. | ||
|
||
Hint 1. Avoid names with backspace and use "-" or "_" to separate names. eg. this "bean-data-arusha.csv" instead of this "Bean data Arusha.csv" | ||
|
||
Hint 2. Create a sub-folder "data/raw" do add data in the raw format and that need to be heavily cleaned or organized before the analysis | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# docs | ||
|
||
This is an optional folder. If you plan to write R notebooks, a report, a scientific paper or any document that will summarize/describe the work done in this workflow, use this folder. | ||
|
||
Hint 1. In a .rmd doc, files in the folder output can be called using "../output/filename.extension" | ||
|
||
Hint 2. Use the R package `rticles` to get templates for scientific papers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# outputs | ||
|
||
All the outputs must be written here. | ||
|
||
Hint 1. Avoid names with backspace and use "-" or "_" to separate names. eg. this "plot-bean-yield.png" instead of this "Plot Bean Yield.csv" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# processing | ||
|
||
This is an optional folder. Files that are too heavy or big to be processed during analysis can rest here. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# scripts | ||
|
||
All scripts used in the analysis must be here. | ||
|
||
Hint 1. Put your scripts in numeric order, then everybody knows where to start. e.g. | ||
|
||
- 00-functions.R | ||
- 01-data-cleaning-bean-yield.R | ||
- 02-analysis-yield-estimation.R | ||
- 03-produce-maps.R | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX |