---
title: "Computational Essays and Group Work"
author: Jed Rembold
date: January 16, 2025
slideNumber: true
theme: tokyo-night-light
highlightjs-theme: tokyo-night-light
width: 1920
height: 1080
transition: slide
---


## Announcements
- Homework 1 is posted!
	- Partners revealed and introduction at end of class
	- Example of a basic computational essay is on website as well as what we'll do in class today
	- You should be able to at least start problem 1, but will need next Tuesday to complete it
- First check-in is this weekend!


## Today's Plan
- Computational Essays
	- Software
	- Dos and Don'ts
	- Live Demo
- Group Work
	- Approaches
	- Reflection Form
	- Partner Intros


# Computational Essays

## Overview
::::::cols
::::col
- Each problem from an assignment should have a separate computational essay submitted.
- Essays should be standalone (self-contained) HTML documents.
- They are not just annotated code. They are a guide and explanation of your thoughts and conclusions while working through a problem.
::::

::::col
![](../images/comp_essay_snapshot.png)

::::
::::::


## Software
- While you could potentially write a computational essay in any text editor, I am going to push hard for you to use [Quarto](https://quarto.org/) this semester.
	- The benefits are worth it. It is seriously nice.
- Can be utilized in a variety of ways:
	- Pure markdown: Write everything in pure markdown with code cells, and when you compile it the code is run
	- Jupyter Notebooks: You can work in an interactive JupyterNB environment, but can export to a nice Quarto document by just adding some material at the start of the notebook
	- RMarkdown/Notebooks: Renders in basically the exact same way you can knit R Notebooks, but better
- What method you to prefer is entirely up to you. They all get to the same place in the end.


## Editors
- You have a lot of flexibility in what environment you want to work in:
	- VSCode
		- Can render Quarto markdown with extension, using either Python or R if installed on your system
		- Natively supports Jupyter notebooks (and can render with Quarto if installed)
		- Jupyter Notebooks can also run R code (See [IRkernel](https://irkernel.github.io/installation/))
	- JupyterLab
		- Alternative interface to Jupyter notebooks
	- RStudio
		- Primarily for R, but can be used with some Python through the reticulate package


## Computational Essay Fundamentals
- Start with a brief introduction. What are you trying to achieve in this problem. What are you starting with? What are the broad steps that you are going to be following to find your solution.
- Explain what libraries you are importing and why you need/want them.
- Proceed to explain and showcase the steps you are going through on the way to your solution
	- Explanations of equations, code, or visuals should always come in the text _before_ they appear
- Summarize at the end, ensuring that you have answered all the question


## Dos and Don'ts
::::::cols
::::col
:::{.block name="Do"}
- Include units: in graphs, in printed out values
- Include axis labels in all plots
- Explain why a reader should care about anything you show them: a table, a visual, and equation. What should they pay attention to?
- Feel free to collapse some code, if the output is what matters, but don't hide it completely
- Have everyone in your group proofread your writing. This is an essay after all.
- Be consistent with text side, headings, etc.
:::
::::

::::col
:::{.block .alert name="Don't"}
- Have back-to-back code chunks without any textual exposition between
- Rely on your code to explain something. That is what writing is for.
- Print off unnecessary things from code blocks. That is for testing. Clean it up before publishing.
- Use an important equation in a block of code before explaining it and rendering it nicely
- Make single plots huge, as they then break up the flow of your writing. Side-by-side figures are very useful.
:::
::::
::::::

## Example Problem
- The file [here](../demos/brightest_200.csv) is a CSV file containing the names and celestial coordinates of the brightest 200 stars in the night sky.
- Visualize the stars and highlight the constellation Orion.
- How long after the start Arcturus sets will the star Betelgeuse set?


# Group Work

## Strategies
:::{style='font-size:.9em'}
You are always free to follow your own strategies, for what you think will work best for you and your partner. The following are just some strategies that I have observed led to students being more successful.

- Start early. Many questions are demanding conceptually, and you want to leave yourself time to ask questions.
- Do **not** divide and conquer. Find time to work together on 1 problem at a time.
- Embrace individual strengths and passions. What do you both enjoy doing/working on?
- Plan to meet multiple times over the two-week span.
- Leave time for both members to read and approve of the final submissions.
- Keep very clear lines of communication! What method do you both prefer to communicate with?
- Extend the grace to your partner to assume they are trying their best.
:::

## Introspection
- The best groups I have been a part of functioned well because of an understanding of the strengths and weaknesses of the individual members. That means you should have an idea going into any group of _how_ you would prefer to contribute.
	- What do you feel you are particularly good at?
	- What sort of work makes you happy or feeling satisfied?
	- What do you feel less strong in, and could use support with?
- Any/All of the above could be about technical knowledge (e.g. data visualization, dataframe manipulation, error analysis), scientific knowledge (e.g. how to determine the period of an oscillation, or interpret a spectrum), or "soft" skills (e.g. explaining concepts, organization, proofreading and polish)


## Reflection
- Take 10-15 minutes to fill out the form [here](https://docs.google.com/forms/d/e/1FAIpQLSdaUjeiwdLBnon0uamSm0lKLgxC88S24TsB70UcPs0_8yrzFQ/viewform?usp=sharing)
	- The first few questions are just for my information
	- The later questions should give you material to help guide initial meetings with new partners
		- Take time on these and make sure you are happy with them. I promise it will help.


## HW1 Partners!
Below are the partner assignments for HW1. Rearrange yourself in the room to find your partner and prepare to answer the questions on the following slide.

::::::{.cols style='align-items: flex-start'}
::::col

:::{.block name="Left Tables"}

- Mamadou, Felicity & Luca C
- Jared & Tegan
- Emalia & Sadie
- Gabriella & Conor
- Marcus & Lucca B
- Maddie & Luna
- Aurora & Sergio

:::

::::

::::col

:::{.block name="Right Tables"}

- Izzy & Elliot
- M & Evan
- Oscar & Sawyer
- Clay & Evyn
- Sage & Pearson
- Greg & Salem

:::
::::
::::::

## Partner Questions
- Briefly introduce yourself: name, pronouns, year, major, preferred scripting language
- What was your favorite thing that you did over winter break?
- Why did you register for this course? What are you most looking forward to?
- What are you feeling least confident about currently in this course? Could your partner help with that?
- What strengths do you bring to this group?
- How do you prefer to communicate?
- When do you plan to meet to start working on HW1?
