SlideShare a Scribd company logo
1 of 45
The Lesser Known s
of the Tidyverse
Emily Robinson
@robinson_es
About Me
➔ R User ~ 6 years
➔ Data Scientist at DataCamp
➔ Enjoy talking about:
◆ A/B testing
◆ Building and finding data
science community
◆ R
Talk Goals
1. Keep you hip to the lingo
2. Stop you from doing this ….
…. by sharing useful functions
3. Point you to resources
The Tidyverse
Coherent system of packages for
data manipulation, exploration,
and visualization that share a
common design philosophy
Tidyverse = ?
Tidyverse = !
Tidyverse != Hadleyverse
Tidyverse != Hadleyverse
Many other contributors
Demo
Some steps of a data analysis workflow
➔ View dataset in console
➔ Inspect missing values
➔ Examine some columns
➔ Make a plot
➔ Do something cool and new!
Problem: it takes over the console
Step 1: print your dataset!
Prints only 10 rows and the columns that fit on the screen
Solution: as_tibble()
Problem: how do you do this for every column?
Step 2: examine your NAs
Problem: missing values aren’t actually NA
Answer: purrr::map_df() to “map” function over each column
Solution: na_if() to replace certain values with NA
Problem: how I can I do this quickly?
+
Skimr
Solution: dplyr::select_if() + skimr::skim()
Step 3: examine your numeric columns
Problem: it has multiple answers in each row
Step 4: examine a single column
Solution: stringr::str_split() …
Solution: stringr::str_split() and tidyr::unnest()
+
Problem: it’s a mess
Step 5: make a plot!
Solution: coord_flip …
But they’re not ordered
+ forcats::fct_reorder
Final step: do something cool and new!
Problem:
One solution: make a minimal reproducible example
+
Part 0 (optional): use tribble() to make a toy dataset
Part 1: Use reprex() to find any problems
Credit: Nick Tiernay, https://www.njtierney.com/post/2017/01/11/magic-reprex/
Part 2: Use reprex() to post your question or issue
Credit: Nick Tiernay, https://www.njtierney.com/post/2017/01/11/magic-reprex/
Review
stringr::str_split
tidyr::unnest
coord_flip()
forcats::fct_reorder
tibble::tribble
reprex::reprex
tibble::as_tibble
purrr:map_df
dplyr::na_if
dplyr::select_if
skimr::skim
Resources
R4ds.had.co.nz
#rstats twitter
#rstats twitter
Rstudio.com/resources/cheatsheets
DataCamp.com
Learn | https://datacamp.com/courses
Conclusion
The tidyverse
Come for the stickers and
package names …
Stay for the friendly
community and happy
workflow
Thank you!
tiny.cc/nyrtalk
hookedondata.org
@robinson_es

More Related Content

Similar to NY R Conference talk

LECTURE 6 DESIGN, DEBasd, INTERFACES.pdf
LECTURE 6 DESIGN, DEBasd, INTERFACES.pdfLECTURE 6 DESIGN, DEBasd, INTERFACES.pdf
LECTURE 6 DESIGN, DEBasd, INTERFACES.pdf
ShashikantSathe3
 
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdfLECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
SHASHIKANT346021
 
Applying an intersectionality lens in data science
Applying an intersectionality lens in data scienceApplying an intersectionality lens in data science
Applying an intersectionality lens in data science
Data Con LA
 
Five Ways To Do Data Analytics "The Wrong Way"
Five Ways To Do Data Analytics "The Wrong Way"Five Ways To Do Data Analytics "The Wrong Way"
Five Ways To Do Data Analytics "The Wrong Way"
Discover Pinterest
 
How To Contribute To Drupal Drupal - DrupalCon Paris
How To Contribute To Drupal Drupal - DrupalCon ParisHow To Contribute To Drupal Drupal - DrupalCon Paris
How To Contribute To Drupal Drupal - DrupalCon Paris
Drupalcon Paris
 
Beginner's Guide to UI Design
Beginner's Guide to UI DesignBeginner's Guide to UI Design
Beginner's Guide to UI Design
Máirín Duffy
 

Similar to NY R Conference talk (20)

How To Contribute Drupalcon
How To Contribute   DrupalconHow To Contribute   Drupalcon
How To Contribute Drupalcon
 
Startup Data Science
Startup Data ScienceStartup Data Science
Startup Data Science
 
LECTURE 6 DESIGN, DEBasd, INTERFACES.pdf
LECTURE 6 DESIGN, DEBasd, INTERFACES.pdfLECTURE 6 DESIGN, DEBasd, INTERFACES.pdf
LECTURE 6 DESIGN, DEBasd, INTERFACES.pdf
 
2022 - Delivering Powerful Technical Presentations.pdf
2022 - Delivering Powerful Technical Presentations.pdf2022 - Delivering Powerful Technical Presentations.pdf
2022 - Delivering Powerful Technical Presentations.pdf
 
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdfLECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
LECTURE 6 DESIGN, DEBUGGING, INTERFACES.pdf
 
Developing in R - the contextual Multi-Armed Bandit edition
Developing in R - the contextual Multi-Armed Bandit editionDeveloping in R - the contextual Multi-Armed Bandit edition
Developing in R - the contextual Multi-Armed Bandit edition
 
The Essential Perl Hacker's Toolkit
The Essential Perl Hacker's ToolkitThe Essential Perl Hacker's Toolkit
The Essential Perl Hacker's Toolkit
 
Lotusphere 2007 AD505 DevBlast 30 LotusScript Tips
Lotusphere 2007 AD505 DevBlast 30 LotusScript TipsLotusphere 2007 AD505 DevBlast 30 LotusScript Tips
Lotusphere 2007 AD505 DevBlast 30 LotusScript Tips
 
2014 pycon-talk
2014 pycon-talk2014 pycon-talk
2014 pycon-talk
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
 
Final grasp ASE
Final grasp ASEFinal grasp ASE
Final grasp ASE
 
Applying an intersectionality lens in data science
Applying an intersectionality lens in data scienceApplying an intersectionality lens in data science
Applying an intersectionality lens in data science
 
Ad505 dev blast
Ad505 dev blastAd505 dev blast
Ad505 dev blast
 
Unicorn or Rhino? Agility in the Data Realm?
Unicorn or Rhino? Agility in the Data Realm?Unicorn or Rhino? Agility in the Data Realm?
Unicorn or Rhino? Agility in the Data Realm?
 
Qualitative Data Analysis using NVivo10 - A workshop for facilitators
Qualitative Data Analysis using NVivo10 - A workshop for facilitatorsQualitative Data Analysis using NVivo10 - A workshop for facilitators
Qualitative Data Analysis using NVivo10 - A workshop for facilitators
 
Five Ways To Do Data Analytics "The Wrong Way"
Five Ways To Do Data Analytics "The Wrong Way"Five Ways To Do Data Analytics "The Wrong Way"
Five Ways To Do Data Analytics "The Wrong Way"
 
How To Contribute To Drupal Drupal - DrupalCon Paris
How To Contribute To Drupal Drupal - DrupalCon ParisHow To Contribute To Drupal Drupal - DrupalCon Paris
How To Contribute To Drupal Drupal - DrupalCon Paris
 
Data Visualization: A Quick Tour for Data Science Enthusiasts
Data Visualization: A Quick Tour for Data Science EnthusiastsData Visualization: A Quick Tour for Data Science Enthusiasts
Data Visualization: A Quick Tour for Data Science Enthusiasts
 
Data Visualization
Data VisualizationData Visualization
Data Visualization
 
Beginner's Guide to UI Design
Beginner's Guide to UI DesignBeginner's Guide to UI Design
Beginner's Guide to UI Design
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 

NY R Conference talk