Data Carpentry for Agroecologists - TREC-Agroecology/lab-wiki GitHub Wiki
Contents
- Course Introduction and Structure
- Week 1 - Set Up
- Week 2 - Data Structure
- Week 3 - Analysis Plan
- Week 4 - Data Management Basics
- Week 5 - Data Management Grouping
- Week 6 - Data Visualization
- Week 7 - Pub Quality Figures
- Week 8 - Statistics
- Week 9 - Revisit Analysis Plan
- Week 10 - Advanced Programming
- Week 11 - Style Guide
- Week 12 - Course Assessment and Project Report
Course Introduction and Structure
This page serves as the working syllabus for the Agronomic Problems independent study for data management and analysis. Each week you will complete an assignment noted on this page. Your response to the assignment should be uploaded as commits to a personal GitHub repository ("repo"). I will be available for help, as needed, but will otherwise be monitoring your repo and commenting directly on your code or in the "Issues" tab. To mark your progress each week:
- Open an issue in your repository with a name like
Week1-Assignment
. You may need to set up the issue feature inSettings
by checking theIssues
box inFeatures
Add your list of tasks for the week like:
- [ ] Set something up in my repo
- [ ] Complete a task with the data
- If you have trouble, describe your problem in the week's issue and tag me (
@brymz
). I will get back to you with feedback to continue the assignment. Repeat step 2, as needed - When everything works well, tag me (
@brymz
) with a message that you are done for the week and close the issue. - Celebrate your completion of the week's assignment.
Week 1 - Set up
Reading
Assignment
- Set up 'Command Prompt', 'Git bash', or 'Terminal' on your machine. Be sure that is accepts the command
git
. - Set up a new repo on GitHub from your username (eg.,
brymz/ag-problems-semester
). Email me the link to your repository. - Open an issue in your repository with a name like
Week1-Assignment
. You may need to set up the issue feature inSettings
by checking theIssues
box inFeatures
Add your list of tasks for the week like:
- [ ] Email Zack the link to this repo
- [ ] Upload a data file
- Upload a data file (
.csv
) that you plan to work with to the repo - If you have trouble, describe your problem in this week's issue and tag me (
@brymz
). - If everything works well, tag me (
@brymz
) with a message that you are done for the week and close the issue.
Week 2 - Data Structure
Reading
- https://www.tandfonline.com/doi/full/10.1080/00031305.2017.1375989
- Lessons 1-3 from https://datacarpentry.org/spreadsheet-ecology-lesson/
Assignment
- Start a new
Wiki
page. - Add a section that describe the methods used to collect the data.
- Add a section that details all of the column names used in the data.
- Review your data with a critical eye based on the readings for well structured data. List any problems or improvements you'd like to make in this week's issue.
- Make the appropriate changes to your data and
commit
those changes with a descriptive commit message to the repo. the Have your data set in.csv
Week 3 - Analysis Plan
Reading
- Review your research proposal.
Assignment
- Consider an analysis that you would like to complete that complements or contributes to your project/thesis.
- Describe the analysis in your issue for the week.
- Reflect on the data that you uploaded. Does it match with your analysis plan? Is there other data that you need?
Commit
additional data to the repo, as necessary, not to exceed three additional data files.- Complete the Week 2 assignment for the additional data files.
Week 4 - Data Management - Basic
Reading
- https://datacarpentry.org/semester-biology/readings/R-data/;
select()
,filter()
,mutate()
Assignment
- Install R Studio
- Install
"tidyverse"
- Set up R script
library(tidyverse)
data <- read_csv("your_data_file.csv")
select
columns from your data that you will need to complete an analysis.filter
the data for some conditions appropriate for your analysis.mutate
the data to add an additional column.
Week 5 - Data Management - Grouping
Reading
- https://datacarpentry.org/semester-biology/readings/R-data/;
group_by()
,summarize()
Assignment
- Group data by treatments (
group_by
). - Produce a summary table of treatment results (
summarize
) by making an average (mean
) and standard deviation (sd
).
Week 6 - Data Visualization
Readings
- http://r4ds.had.co.nz/data-visualisation.html
- Extra reference: https://ggplot2.tidyverse.org/reference/
Assignment
- Produce a graphic that visualizes a key element of your data from the Week 4 assignment.
- Produce a graphic that visualizes a summarized component of your data from the Week 5 assignment.
Week 7 - Publication Quality Figures
Readings
Assignment
- Revise your graphics from last week to have a theme layer and other elements of a pub quality figure.
- Produce a graphic with a
facet()
layer based on some grouped element of your data.
Week 8 - Statistics
Readings
- ANOVA (
aov()
) - Linear Regression (
lm()
)
Assignment
- Complete a ANOVA test with a selection of your data. Show the results table in your code output. BONUS: Conduct post-hoc test using the
agricolae
packageHSD.test()
(https://www.rdocumentation.org/packages/agricolae/versions/1.3-3/topics/HSD.test) - Complete a linear regression with a selection of your data. Show the model coeeficients and r^2 in your code output.
Week 9 - Revisit Analysis Plan
Readings
- None.
Assignment
- Revisit your analysis plan. It should include a description of the analysis that you'd like to complete for your course project. Make sure this plan is well defined and complete.
- Consider your analysis plan as it relates to the programming required to complete the task. List each of the steps as comments (e.g.,
## Upload code
) in a new r script file. Break down your analysis plan in as many small pieces as possible.
Week 10 - Advanced Programming
Readings
- http://swcarpentry.github.io/r-novice-inflammation/02-func-R/
- http://swcarpentry.github.io/r-novice-inflammation/03-loops-R/
- http://swcarpentry.github.io/r-novice-inflammation/04-cond/
Assignment
- Write a function with a piece of code in your analysis that is used multiple times.
- Loop over a repeated procedure.
- Write an
if
statement to complete a task including a conditional.
Week 11 - Style Guide
Readings
Assignment
- Review your completed code and revise to good style.
Week 12 - Project Report and Course Assessment
Readings
- None
Assignment
- Complete your project as per your analysis plan.
- Describe briefly your project and project files in the repository
README.MD
.- Which files complete your project analysis that should be reviewed?
- Were there anything you attempted that are not included in the project analysis?
- What are the next steps in your analysis to complete in the future?
- Include a paragraph on your learning experience and feedback for future students in the repository
README.MD
. - Complete the following course assessment questions in the week 12 issue:
- Were the readings effective to provide background information to complete the assignment?
- Were the assignments helpful to practice programming topics presented in the reading?
- Was the course effectively structured around your analysis plan?
- What was your favorite thing about the course?
- How can the course be improved for future students?
- Declare your project and assessment completion in the week 12 issue.