Think of yourself as a “consultant” asked by a client to investigate a topic. This is the “Executive Summary” - details in appendix (individual reports)
Should cover roughly the same material as today’s presentation:
Can link to individual reports for details
Use image links ![]() to reference figures from individual reports
“Words and pictures” not “code”
Only one of you needs to submit on Brightspace. Everyone should still open a GH issue
Final Report - Individual
Technical Appendix to Group Report.
Appendix for lower-level (detail-oriented) staff, not leadership
Still requires writing and context, etc. but this is where I’m going to focus on your code and analysis.
Good Thinking is more important than Good Findings
I am your audience, so don’t waste time explaining basic technical details. I’m more interested in you justifying the choices you made along the way
If you don’t submit, you won’t receive any points!
Final Project Grading
Rubric is set very high to give me flexibility to reward teams that take on big challenges
Hard rubric => Grades are curved generously
Multiple paths to success
If your project is “easy” on an element (data import in particular), that’s great! Don’t spend the effort over-complicating things. Effort is better spent elsewhere
On to the Show!
Presentation Order
Presentation Order
Team
1
Water Benders (JE+JABB+MTP+JA+AS)
2
3-1-Fun! (XC+ML+ER+RJSN)
3
Maniac Braniacs (HHS+KK+FC+DN)
4
Emissions Impossible (LR+MOG+APTL)
5
Inspector Gadget (MUO+KN+CM+ID+KM)
Wrap Up
Time to write:
Team Formation ✅
Project Proposals ✅
Check-In Presentations ✅
Final Presentations ✅
Final Reports ⬅️
Individual Technical Report
Group Summary Report
Final Peer Evaluations
Next week: statistical modeling - useful for some integration aims
Optional enrichment: Functional Programming in R with purrr
Life Tip of the Week
End of the Semester is Upcoming
End of the semester is rough
More important than ever to plan ahead
Ask for extensions / accomodations early
Help us help you
Faculty are slammed as well
Don’t ‘grade grub’
Makes it harder for professors to curve in your favor
Seek extra credit from the syllabus
Don’t ask for special treatment - ask how to take advantage of existing opportunities
Take care of yourselves
Seasonal bugs and allergies going around …
Musical Treat
Optional Material: Functional Programming with purrr
Functional Programming
Functional programming - purity
Minimizing book-keeping and side-effects
Can go deep into FP world - we’re just dipping a toe in
[[1]]
month upper n_vowels
1 January JANUARY 3
[[2]]
month upper n_vowels
1 February FEBRUARY 3
[[3]]
month upper n_vowels
1 March MARCH 1
[[4]]
month upper n_vowels
1 April APRIL 2
[[5]]
month upper n_vowels
1 May MAY 1
[[6]]
month upper n_vowels
1 June JUNE 2
[[7]]
month upper n_vowels
1 July JULY 1
[[8]]
month upper n_vowels
1 August AUGUST 3
[[9]]
month upper n_vowels
1 September SEPTEMBER 3
[[10]]
month upper n_vowels
1 October OCTOBER 3
[[11]]
month upper n_vowels
1 November NOVEMBER 3
[[12]]
month upper n_vowels
1 December DECEMBER 3
map returning Data Frames
Combine this list of little DFs rowwise with list_rbind()
month upper n_vowels
1 January JANUARY 3
2 February FEBRUARY 3
3 March MARCH 1
4 April APRIL 2
5 May MAY 1
6 June JUNE 2
7 July JULY 1
8 August AUGUST 3
9 September SEPTEMBER 3
10 October OCTOBER 3
11 November NOVEMBER 3
12 December DECEMBER 3
Mapping Together
Often, we will want to map multiple things together:
month.name
month.abb
map2_chr(month.name, month.abb, \(x, y) paste(y, "is short for", x))
[1] "Jan is short for January" "Feb is short for February"
[3] "Mar is short for March" "Apr is short for April"
[5] "May is short for May" "Jun is short for June"
[7] "Jul is short for July" "Aug is short for August"
[9] "Sep is short for September" "Oct is short for October"
[11] "Nov is short for November" "Dec is short for December"
[1] "January is month number 1" "February is month number 2"
[3] "March is month number 3" "April is month number 4"
[5] "May is month number 5" "June is month number 6"
[7] "July is month number 7" "August is month number 8"
[9] "September is month number 9" "October is month number 10"
[11] "November is month number 11" "December is month number 12"
map vs Vectorization
map is most useful when the underlying function can’t be vectorized: e.g., file processing or downloading
# A tibble: 5 × 4
type setup punchline id
<chr> <chr> <chr> <int>
1 general What did the fish say when it hit the wall? Dam. 1
2 general How do you make a tissue dance? You put a little b… 2
3 general What's Forrest Gump's password? 1Forrest1 3
4 general What do you call a belt made out of watches? A waist of time. 4
5 general Why can't bicycles stand on their own? They are two tired 5
map pipelines
Often we will want to map several times as we perform steps of an analysis.
# A tibble: 5 × 4
type setup punchline id
<chr> <chr> <chr> <int>
1 general What did the fish say when it hit the wall? Dam. 1
2 general How do you make a tissue dance? You put a little b… 2
3 general What's Forrest Gump's password? 1Forrest1 3
4 general What do you call a belt made out of watches? A waist of time. 4
5 general Why can't bicycles stand on their own? They are two tired 5
Accessing nested elements
Sometimes, when we have a complex list, we want to pull out certain elements:
Error in `map_dbl()`:
ℹ In index: 2.
Caused by error in `.f()`:
! AN ERROR
Adverbs: safely
nchar_safe <-safely(nchar_bad, otherwise=NA)map(month.name, nchar_safe) |>map("result") |># Result of safely() is list, solist_c() # We must map() our pluck()
[1] 7 8 5 NA 3 4 4 6 9 7 8 8
Adverb: possibly
The safely |> map("result") combo is common, so helper possibly: