CS02: Predicting Annual Air Pollution
This is where you get to put together all you’ve learned so far this quarter - including what you’ve learned from completing cs01 - into a full data science report! This report will include your analysis from top (the background and question) to bottom (your analysis, interpretation, and conclusions.)
We’ll be grading to see that you have: 1) all necessary code for each section of the project. 2) explanatory text that guides the reader from start to finish. 3) polished visualizations that allow the reader to both understand the data you’re working with an your conclusions.
This will be submitted and graded as a group. One submission per group.
Getting started
Here are the steps for getting started:
Avoid waiting until the end to render for the first time. It will be better/easier/less of a headache if you render periodically and know it’s all working as intended.
- Figure out what group you want to work with for cs02 and the final project
- This will be completed in a
cs02-<team name>group repository, which will be created for you and your group mates in the course GitHub organization once groups are formed. - Code + write away in the provided .qmd document!
- Periodically render and commit changes (for example, once per each new part)
- Push all your changes back to your GitHub repo
- This case study will be graded from the HTML file on your group’s GitHub repo.
Outside resources & AI use: Your team’s .qmd includes an Outside Resources & AI Use section. Keep it updated as you go, including which team member(s) used each resource (write “None” if your team didn’t use any). This is required.
A reminder that the Quarto documentation on HTML output covers controlling HTML output (table of contents, code folding, themes, etc.), in case you want to customize your output in some way.
Imports
You are allowed to import whichever packages you like for this case study report.
Main Question
All groups will be answering the following question in their case study:
With what accuracy can we predict US annual average air pollution concentrations?
As noted in class, different groups may have different answers or different specific values, and that’s OK. You have to explain your thinking and use your analysis to help guide your conclusions.
Case Study Report
Your case study can be organized however you see best fit, but we’ll be looking for the following general sections:
- Title
- Authors
- Background/Introduction
- Question(s)
- Data
- Data Explanation
- Data Import
- Data Wrangling
- Analysis
- Results & Discussion (including limitations of your work)
- Conclusion
Now, you may want to combine some of these sections (i.e. include your results and discussion among your analysis code). That’s totally allowed, but we’ll be looking to see that your report includes sufficient information to understand what you did, why you did it, and what your results are.
Extending the Analysis
In addition to getting the code presented in class working, adding explanatory text to your report, and generating polished visualizations, you and your group must “extend the analysis” beyond what was presented in class in a meaningful way. Now “meaningful” is not a very-easily-measured term. A meaningful extension could be carrying out analysis to answer an additional question beyond what was presented in class, or asking the same main question among subgroups, or finding a related dataset and incorporating it into your case study. To determine whether your extension is “meaningful,” you and your group should be able to answer “yes” to the question “Does our extension add something important to this report beyond what was presented in class?”
This extension should be included/woven into your report, meaning it should only be “separated out” as its own section if it makes most sense for the story you’re telling.
General Communication
Each group will need to convey the most important finding(s) to a general audience through some form of communication.
This is very open-ended in its format. It could be a short video, an infographic, an effective email, a graphic, Instagram slides, a short presentation, etc. It will be submitted by one group member on Canvas. (All group members will receive credit.)
Group Feedback
There will be a form to submit upon submission of the case study to provide feedback about working with your group mates. This is meant to motivate not scare. Most groups work out really really well and everyone contributes to the best of their ability. However, if and when that doesn’t happen, I want to be sure I’m aware of the circumstances and follow up as necessary.
Common Deductions
In past iterations of the course, students have commonly lost points on CS02 for the following reasons:
Background & Question | 1) never explaining what PM2.5 is or why we care about it. This is the outcome you’re predicting, so the reader needs to understand it. 2) not introducing the topic of your extension (e.g., education, wildfires, weather) in the background, so it comes out of nowhere later. 3) not stating the extension question with the main question
Data | 1) not citing the data source(s). 2) not introducing the variables, especially those you later use or discuss, before using them. This applies to any additional dataset you bring in for your extension too
EDA | 1) never looking at the distribution of the outcome variable (PM2.5). 2) not exploring the data used in your extension. 3) plots displayed without interpretation or without tying them back to your question. 4) showing
glimpse()/skimroutput without telling the reader what to take from itAnalysis | 1) jumping into modeling without explaining which model you’re using, how it works (briefly), and why it’s appropriate for these data. 2) not explaining your data splitting and cross-validation (what training/testing data are, how and why you split the data the way you did, why that number of CV folds). 3) showing variable importance plots without explaining what “importance” means or interpreting the top predictors (what are they, and is a higher value better or worse for air pollution?). 4) reporting model performance only in a printed tibble/table rather than in the text, or not making clear when results come from the test data. 5) judging models on R² alone. Adding predictors always increases R², so include an error metric (e.g., RMSE) and give it context (how big is that error relative to typical PM2.5 values?). 6) an extension that isn’t motivated by your EDA or a hypothesis, isn’t explained, or whose results aren’t quantified and compared to your main model
Results, Discussion & Conclusion | 1) not discussing limitations. 2) a conclusion that only covers model accuracy and says nothing about what we learned about air pollution itself (which predictors matter, and does that make sense?)
Written Communication & Layout | 1) code and output clutter (leftover sanity checks,
install.packages(), repeatedglimpse()output) that buries the story. Put explanatory text before code so the reader knows what they’re about to see. 2) using abbreviated variable names (from the dataset) in the text and on plot labels instead of readable names. 3) missing transitions or subsection headers, so it’s hard to tell how you got from one part of the analysis to the nextGeneral Communication | 1) too much jargon for a general audience (e.g., random forest, RMSE, R², CMAQ, or PM2.5 without explaining it). 2) too much text. 3) presenting numbers (e.g., model error) without the context needed to tell whether they’re big or small. 4) leaving out what predicts air pollution, which is often the most actionable take-home message
To see specific comments previously received attached to scores received see cs02 tab here.