Earth & Environmental Computing · Week 15 · Course session · 22 slides
Download HTML
Earth & Environmental Computing | Computational Methods for Earth & Environmental Science | 16-Week Course

Advanced Applications and Project Support

Eleven days to the finish. Today: recover state, learn one technique your project needs, triage the rest.

Re-entry · Mini-modules · Validation · Pitfalls · Studio
Week 15·Course session·Open Course Materials | Adapt for your classroom·Week 15 | Course session | First session after Fall Break
Learning Objectives

By the end of this session, you will have...

  • Re-established exactly where your project stands
  • Seen one advanced technique relevant to your analysis
  • A triage list ordered by risk, not by preference
Contents

Today's Lecture

01Re-entry
03Finishing Well
02Mini-Modules
Recap

Where Week 13 Left You

  • Question locked, data loaded, one exploratory figure
  • Roles assigned with named owners
  • Then Fall Break happened to all of it
  • Today is about recovering that state with proof
01

Re-entry

Three lines before any code, and what the class votes to cover.

01 · Re-entry

Three Lines Before Any Code

1

What works

Restart and Run All proves it. Not memory: proof.

2

What is riskiest

The piece that could still sink the project.

3

Due Friday

The concrete milestone: analysis complete, figures drafted.

Projects stall after breaks when groups resume typing instead of re-establishing state.

01 · Re-entry

Class Vote: Two of Three, 15 Minutes Each

  • A. Multi-site spatial analysis: 17 stations, drainage areas, specific discharge
  • B. Climatology and anomalies: was this period unusual?
  • C. Validation patterns: hold out, predict, score, report
02

Mini-Modules

Maps, anomalies, and time-split validation, in six lines each.

02 · Mini-modules

Seventeen Stations on One Map

Python

sites = pd.read_csv(PROCESSED / "iowa_stream_sites_annual_flow.csv",
                    dtype={"site_no": str})
per_site = sites.groupby(["site_no", "latitude", "longitude",
                          "drainage_area_sqmi"], as_index=False)\
                ["mean_discharge_cfs"].mean()
ax.scatter(per_site["longitude"], per_site["latitude"],
           s=per_site["drainage_area_sqmi"] / 20,
           c=per_site["mean_discharge_cfs"], cmap="viridis")
  • Size = drainage area, color = mean flow
  • Useful for any project comparing places
02 · Mini-modules

Specific Discharge Flips the Story

specific_q = mean_discharge / drainage_area

raw flow: big rivers carry more water (no surprise)

per-area flow: which LANDSCAPES yield more water?

normalization turns size into science

units: cfs per square mile, or mm/day

  • The most useful single trick for multi-site projects
02 · Mini-modules

Anomalies in Six Lines

Python

s = series.set_index("date").sort_index()
clim = s.groupby(s.index.month)["value"].mean()
s["anomaly"] = s["value"] - s.index.month.map(clim)

# raw plot answers: what happened?
# anomaly plot answers: was it unusual for the season?
  • Any observable minus its seasonal expectation
  • Useful for any project asking about unusual periods
02 · Mini-modules

Time-Split Validation in Six Lines

Python

train, test = train_test_split_by_time(df, "date", "2024-01-01")
fit = linear_regression_summary(train[x], train[y])
pred_test = fit["intercept"] + fit["slope"] * test[x]
print("train RMSE:", rmse(train[y], fit["intercept"] + fit["slope"] * train[x]))
print("test RMSE: ", rmse(test[y], pred_test))
  • Report the score next to every map, fit, or hydrograph
  • Useful for any project that fits anything
Pause and think

?

Which mini-module applies to YOUR project, and what would its figure look like with your data? If none applies, is your analysis actually done?

03

Finishing Well

The classic final-week failures, and the polish pass that prevents them.

Pitfalls

The Final-Week Classics, Named in Advance

Unlabeled figures

Figures added faster than they are labeled. Fix: checklist pass tonight.

Order-dependent notebook

Runs only in the order last edited. Fix: Restart and Run All now.

Overrun conclusions

"Proves" where evidence "suggests". Fix: calibrate the verbs.

The unexplainable section

One member cannot explain section 3. Fix: walk-throughs this week.

Pitfalls

Each Has a Five-Minute Fix This Week

  • And no fix at all on December 10
  • Missing data citations: add source and access date today
  • Silent AI usage: complete the log while memory is fresh
  • Rehearsal deficit: one timed run this Friday
Deliverable Craft

The README Skeleton That Passes

Python

# Project title
## Research question (one sentence)
## Data
- Source, URL, access date, license note
## How to run
- conda env create -f environment.yml
- open notebooks/final_project/..., Restart and Run All
## Who did what
## AI usage
- See AI_USAGE_LOG.md (or: no AI tools were used)
  • Write it now, not December 10: it exposes missing pieces early
Deliverable Craft

The Figure Polish Pass

  • Re-run the Week 7 checklist on every project figure
  • Labels, units, legend, readable size, stated message
  • One claim per figure; cut the figure that has none
  • Captions written in the notebook, not improvised in the talk
This Week

Studio Plan

Lab session

  • Data cleaning and analysis debugging
  • Instructor circulates with one question per group
  • Figure development

Friday

  • Interpretation and README
  • Code cleanup, reproducibility pass
  • Presentation outline started
Bridge

Connection to Next Week

This weekNext weekBridge idea
Analysis complete, risks retiredSynthesis and presentationsFrom working code to a defensible ten-minute story
Summary

Key Takeaways

  • Re-establish state with proof, not memory
  • Normalize, decompose, validate: three transferable moves
  • The classics are cheap to fix today, impossible on Dec 10
  • Friday milestone: analysis done, figures drafted
Discussion · Next week: course synthesis and presentations

?

State your project's riskiest unfinished piece and the Friday fallback if it fails. If you cannot name a fallback, that IS the risk.