Due on Thursday 5 March at 11:59 PM
Read the instructions carefully and make sure you have all the components on the checklist.
Part 1. Set up tasks
GitHub steps
- Create a repository called
ENVS-193DS_homework-03on GitHub. Make sure you provide a brief description, make it public, and initialize with a README. - Enable GitHub pages.
RStudio/code/computer organization steps
- Clone your repository to your computer.
- Commit and push the
gitignoreand.Rprojfiles with the commit message:initial commit. - Create two new folders in your
ENVS-193DS_homework-03folder: one forcodeand another fordata. - Create a new Quarto or RMarkdown document for your homework submission in the
codefolder. - At the top of your document, include a link to your GitHub repository as a hyperlink.
- Download the soil salinity data to your
datafolder. - Do all of your set up (reading in packages/data) at the top of your .qmd file.
- At minimum, you should have the following packages read in:
tidyverseandhere.
- Other packages you may find useful would be
janitororreadxl.
- Store the salinity data as an object called
salinity.
- Store your personal data as an object with whatever name you think makes sense.
Throughout the course of doing your homework, make at least 10 commits and pushes to the remote.
Part 2. Problems
Problem 1. Slough soil salinity
You are working at a restoration site where you are managing planting of California pickleweed (Salicornia virginica) along a brackish slough (i.e. there is a mixture of fresh water and salt water).
You decide to measure plant growth for individual pickleweed plants by plucking an individual out of the ground and measuring the biomass (in g). You also measure soil salinity (as electrical conductivity in units of millisiemens per centimeter, or mS/cm) at the location in which the individual was growing. Admittedly, this isn’t a perfect study, but it’s what you can do with the time and resources you have!
a. An appropriate test
In 1-3 sentences, name the appropriate test(s) to determine the strength of the relationship between salinity and California pickleweed biomass (hint: there are two). Describe the differences between the two tests.
Be specific in your response to demonstrate your understanding of the variables in this question.
Double check your understanding of the appropriate test. You are trying to understand the strength of the relationship between California pickleweed biomass and soil salinity.
Try committing and pushing your changes here! Write an informative commit message.
b. Create a visualization
Create a visualization that would be appropriate for showing the relationship between soil salinity (in mS/cm) and California pickleweed biomass (in g).
In addition to using the correct geometries, be sure to:
- relabel the x- and y-axes and include units
- use different colors from the
ggplot()defaults
- use a different theme from the
ggplot()default
Try committing and pushing your changes here! Write an informative commit message.
c. Check your assumptions and run your test
In the order that is appropriate, create separate sections using subheaders to:
- check your assumptions
- run your test
In the section in which you check your assumptions, include any code and outputs you think are relevant. (Note: you may have already written code and shown its outputs to check your assumptions in part 1b, depending on the test you decide to go with!). Additionally, write 1-3 sentences describing:
- which assumptions you checked
- how you checked your assumptions
- your assessment of your assumption checks
In the section in which you run your test, be sure your code is annotated and the outputs are visible.
Try committing and pushing your changes here! Write an informative commit message.
d. Results communication
In 1-3 sentences each, write about:
- which test you used, and why (i.e. “To evaluate the strength of the relationship between pickleweed biomass and soil salinity, I used a…”)
- your interpretation of your test (along with the appropriate summary of the test in parentheses)
“We fail to reject the null hypothesis” or “We reject the null hypothesis” is not interpretation. This is a decision you made.
Interpretation should include the pattern, trend, or relationship that your test reveals to you about the biological system.
Stuck? See lecture slides for examples.
Try committing and pushing your changes here! Write an informative commit message.
e. Test implications
You’re working on a team of people at this restoration site who are also concerned about pickleweed planting. In 2-3 sentences, write what you would communicate to them about the results of this test and what it means for pickleweed planting success at your site.
Be cognizant of your audience as you are writing: what would they need to know to take action?
Try committing and pushing your changes here! Write an informative commit message.
f. Double check your own work.
In part a, you outlined two potential tests to answer this question about the strength of the relationship between soil salinity and pickleweed biomass. In part c, you chose a test, checked your assumptions, and ran one.
Try running the other test you listed in part a. Include the annotated code and output.
In 1-3 sentences, describe whether or not the two tests would have led you to make the same decision (about the null hypothesis) and interpret the results the same way (about the relationship between soil salinity and pickleweed biomass).
In your description, be specific about the tests, their components, and their relation to the variables.
Problem 2. Personal data
Before doing this problem, update your spreadsheet with your new observations. Save your data as a .csv or .xlsx in your data folder.
a. Updating your visualizations
Revisit the visualizations you created in homework 2.
Provide the code and output for updated plots with your most recent observations.
Note: if you think that a different plot type or different variables would be more interesting to visualize, then change your plots!
You should have the annotated code and output for two plots.
For each plot, be sure to:
- label the x- and y- axes and provide units
- include the date of the most recent observation as a subtitle
- clean up the visual clutter (e.g. grids, backgrounds)
- use colors that are different from the
ggplot()defaults
If you are happy with the plots you made for homework 2 (and you received full marks on those plots, or your revised plots), then reuse your code! You don’t have to write completely new code for plots that you’ve already made.
Try committing and pushing your changes here! Write an informative commit message.
b. Captions
In text (not in code), write captions for both your figures.
Try committing and pushing your changes here! Write an informative commit message.
Try rendering your document here! Commit and push your changes, then find the url to your rendered output (if you get stuck, see the video on Canvas and/or the Git/GitHub basics page under the “Resources” tab).
Double check that your rendered document looks the way you would expect (e.g. figures all correct, text is formatted correctly). If not, go back and fix any issues or ask for help.
Problem 3. Affective visualization
In this problem, you will create an affective visualization using your personal data in preparation for workshops during weeks 9 and 10.
In lecture, we talked about the three vertices of data visualization: 1) exploratory, 2) affective, and 3) communicative. We’ve done a lot of exploratory and communicative visualization, but have yet to think about affective visualization.
When thinking of affective visualization, you can expand your ideas of what data visualization could be. Some examples of affective visualizations include:
- Jill Pelto’s paintings
- Lorraine Woodruff-Long’s warming strips quilt
- Stefanie Posavec and Giorgia Lupi’s Dear Data project
- Environmental Graphiti
See slides from the data visualization lecture for more ideas.
a. Describe in words what an affective visualization could look like for your personal data (3-5 sentences).
Try committing and pushing your changes here! Write an informative commit message.
b. Create a sketch (on paper) of your idea.
Include a photo of this sketch in your document.
Try committing and pushing your changes here! Write an informative commit message.
Double check your rendered URL to make sure the photo of your sketch shows up.
c. Make a draft of your visualization.
Feel free to be creative with this! The one rule is that you may not use any code to create your visualization.
Include a photo of your draft visualization in your submission.
You need to build in enough space or flexibility to edit your work after receiving feedback.
For example, if you are making a sculpture, you could draw your form and create a mock up out of clay, paper, etc. but not start on the final piece.
If you are making a digital drawing, you could draw an outline and start some color/tonal work without finishing your entire piece.
The timeline for your affective visualization is as follows:
- week 8-9: brainstorm, draft
- week 9: peer feedback in workshop
- week 10: present final version in workshop
That means you will have one week between getting feedback and incorporating it into your final version. Plan accordingly.
Try committing and pushing your changes here! Write an informative commit message.
If you are including a photo, double check your rendered URL to make sure the photo of your draft shows up.
d. Write an artist statement.
An artist statement gives the audience context to understand your work. For each of the following points, write 1-3 sentences to address:
- the content of your piece (what are you showing?)
- the influences (what did techniques/artists/etc. did you find influential in creating your work?)
- the form of your work (watercolor, oil painting, crocheted object, etc.)
- your process (how did you create your work?)
Try committing and pushing your changes here! Write an informative commit message.
Problem 4. Statistical critique
At this point, you have seen and created a lot of figures for this class. Revisit the paper you chose for your critique and your homework 2, where you described figures or tables in the text. Address the following in full sentences (3-4 sentences each).
For this section of your homework, you will be evaluated on the logic, conciseness, and nuance of your critique.
a. Revisit and summarize
What are the statistical tests the authors are using to address their main research question? (Note: you have already written about this in homework 2! Find that text and provide it again here!)
Insert the figure or table you described in Homework 2 here.
Try committing and pushing your changes here! Write an informative commit message.
b. Visual clarity
In 2-4 sentences, answer the question that best fits your paper.
If you inserted a figure in Part a: How clearly did the authors visually represent their statistics in figures? For example, are the x- and y-axes in a logical position? Do they show summary statistics (means and SE, for example) and/or model predictions, and if so, do they show the underlying data?
If you inserted a table in Part b: How clearly does the table represent the data underlying tests?
If you have neither: Critique another figure or table in the text for visual clarity (and insert a screenshot of that figure/table in your submission).
Try committing and pushing your changes here! Write an informative commit message.
c. Aesthetic clarity
In 2-4 sentences, answer the question that best fits your paper.
If you inserted a figure in Part a: How well did the authors handle “visual clutter”? How would you describe the the data:ink ratio?
If you inserted a table in Part b: How well did the authors handle “visual clutter”? Is there any bolding/italic text to draw your eye to specific numbers?
If you have neither: Critique another figure or table in the text for aesthetic clarity (and insert a screenshot of that figure/table in your submission).
Remember that data:ink ratio is not an actual ratio, but a way of thinking about the amount of visual clutter relative to the information being presented.
Try committing and pushing your changes here! Write an informative commit message.
d. Recommendations
In 2-4 sentences, outline what recommendations would you make to make the figure or table better. What would you take out, add, or change? Provide explanations/justifications for each of your recommendations.
Alternatively, if the authors did not represent their statistics in a figure, what kind of figure would you recommend to them? Describe the x- and y-axes, with any geometries and aesthetics (colors, etc.). Provide enough explanation such that someone would be able to create the figure you describe in code. Provide explanations/justifications for the figure you would recommend.
Try committing and pushing your changes here! Write an informative commit message.
Assignment checklist
On Canvas, you will submit two links:
- the link to your GitHub repository
- the link to your rendered html
Your GitHub repository should:
Your rendered html should:
Additionally, your rendered html should include only the components listed below:
for Problem 1:
for Problem 2:
for Problem 3:
for Problem 4:
Lastly, check out the rubric on Canvas.
General formatting components
You will only receive full marks for annotations if you have meaningful comments for:
- each line of visualization code and/or ggplot geom/theme call (not needed for each argument, though good to have)
- each function in any piping operations
- set up code to denote where packages and/or data are read in
- each argument of a test call
You will only receive full marks for readability if:
- all messages/warnings are hidden
- all code is contained in code chunks (double check line breaks in comments once you render your document)
- all text is where it’s supposed to be (all components like headers, main text, superscripts/subscripts, etc. show up correctly)
- code includes carriage returns, spaces, etc. to make pipe operations and arguments clear
- code includes consistent spacing and indents