Tidy Data Principles and Data Cleaning in R

undefined
Dplyr Tidyr & R
Markdown
SNOW DAY, SPRING 2017
Installing packages
 
install.packages(“package name”)
 
So for diplyr… install.packages(“dplyr”)
 
                          library(dplyr)
Concepts of Tidy Data
Data is often messy!
We need a precise way to talk about “Tidy” data
Goal: Represent one fact in one place
If one fact in multiple places, chance to record
different values!
Messy? Tidy?
TIDY!
Information remains the same, but values, variables, and observations are more clear
Common problems with messy data
 
• Column headers are values, not variable names.
 
• Multiple variables are stored in one column.
 
• Variables are stored in both rows and columns.
 
• Multiple types of observational units are stored in the same table.
 
• A single observational unit is stored in multiple tables
An Example
Problem!
Column headers are values, not variable names.
What are the
variables here?
Religion, Income,
Frequency
“Melting” Data
The “Molten” set
Another example
Its “Tidy” version
For other examples
 
…and also a great read. See the link on the GH 811 site
 
 
 
 
Slide Note
Embed
Share

Exploring concepts of tidy data and data cleaning techniques using dplyr, tidyr, and R Markdown. Learn how to tidy messy datasets, solve common data problems, and transform data for analysis. Dive into examples and practical tips for efficient data manipulation.

  • Tidy Data
  • Data Cleaning
  • dplyr
  • tidyr
  • R Markdown

Uploaded on Sep 30, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Dplyr Tidyr & R Markdown SNOW DAY, SPRING 2017

  2. Installing packages install.packages( package name ) So for diplyr install.packages( dplyr ) library(dplyr)

  3. Concepts of Tidy Data Data is often messy! We need a precise way to talk about Tidy data Goal: Represent one fact in one place If one fact in multiple places, chance to record different values!

  4. Messy? Tidy? TIDY! Information remains the same, but values, variables, and observations are more clear

  5. Common problems with messy data Column headers are values, not variable names. Multiple variables are stored in one column. Variables are stored in both rows and columns. Multiple types of observational units are stored in the same table. A single observational unit is stored in multiple tables

  6. An Example What are the variables here? Religion, Income, Frequency Problem! Column headers are values, not variable names.

  7. Melting Data

  8. The Molten set

  9. Another example

  10. Its Tidy version

  11. For other examples and also a great read. See the link on the GH 811 site

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#