27
Teaching data science with puzzles

Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Teaching data science with puzzles

Page 2: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 3: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 4: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 5: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 6: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 7: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 8: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 9: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Wrangling

Page 10: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Wrangling Workflow

Page 11: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Web-based experience

Language & platform agnostic

Page 12: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

R-mediated experience

Workflow

Page 13: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 14: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

New R Project

Page 15: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Auto-generated table of contents

Page 17: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Paths that work in the console & when rendered

Knittable .R file

Omit tidyverse messages from html output

Page 18: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

The neighborhood deli makes amazing sandwiches--from classics like BLTs to dessert sandwiches like Fluffernutters. Since many of their specialty ingredients keep going bad, they've decided to cut their selection and focus on their best-selling sandwich.

Photo: flickr skywhisperer

Page 19: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

To help with the decision, the storeowners collected data on their customers’ favorites. Most people listed several varieties (in no particular order). Here’s a sample of the data:

In this sample, the Dagwood sandwich is the most popular.

In the full dataset, what is the most popular sandwich among the customers?

Page 20: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

test case

In this sample, the Dagwood sandwich is the most popular.

Page 21: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 22: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 23: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Photo: Wikipedia

Page 25: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you
Page 26: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Beyond the

Test cases

Consistent and parseable names

Projects & version

control

Self-contained code

Page 27: Teaching data science with puzzles - useR! 2019user2019.r-project.org/static/pres/t278933.pdf · science and i nvestment management company ex Ed Day 11: H Crossing the bridge , you

Thank you!

bit.ly/ds-puzzles