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

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
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...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
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...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 

NY R Conference talk