This R script provides a comprehensive overview of data visualization and data manipulation techniques using various libraries like DPLYR, TIDYR, & Data Visualization using GGPLOT, PLOTLY etc.
R Data Visualization and Manipulation Guide
Overview
This repository provides a comprehensive guide to data visualization and manipulation in R, utilizing powerful libraries such as dplyr, tidyr, ggplot2, and plotly. It covers essential techniques for handling and visualizing data efficiently.
Key Sections
Data Visualization Keywords:
- ggplot2
- plotly
- plot(), hist(), boxplot()
- geom_bar(), geom_point(), geom_boxplot()
- aes(), facet_wrap(), coord_flip()
- scatter plot, bar chart, histogram, box plot, pie chart, heatmap, word cloud
Data Manipulation (DPLYR) Keywords:
- dplyr
- filter(), select(), mutate(), arrange(), summarise()
- group_by(), rename(), distinct(), count()
- left_join(), right_join(), inner_join(), full_join()
- %>% (Pipe Operator)
Data Reshaping (TIDYR) Keywords:
- tidyr
- gather(), spread()
- separate(), unite()
General R Functions and Libraries:
- install.packages(), library()
- View(), head(), tail()
- sample_n(), sample_frac()
- dataset: flights, mtcars, airquality, mpg
- Base R, grid graphics, MASS
- data transformation, data visualization, tidy data, data wrangling
π Charts and Graphs
Demonstrates various visualization techniques, including:
-
Pie charts
-
Bar charts
-
Histograms
-
Box plots
-
Scatter plots
-
Heatmaps
-
Word clouds
π DPLYR for Data Manipulation
Learn how to efficiently manipulate datasets with functions like:
-
filter(), select(), mutate(), arrange(), summarise()
-
group_by(), rename(), distinct(), count()
-
Data joining with left_join(), right_join(), inner_join(), full_join()
π TIDYR for Data Reshaping
Transform and tidy datasets using:
-
gather() to make wide data longer
-
spread() to make long data wider
-
separate() to split columns
-
unite() to combine columns
π Data Visualization Techniques
Base R Graphics
- plot(), hist(), boxplot() for quick and easy visualizations.
ggplot2 for Advanced Visualizations
Create professional and customizable visualizations using the grammar of graphics.
plotly for Interactive Plots
Build interactive and dynamic web-based visualizations.
π Examples and Use Cases
Demonstrates practical applications using datasets such as:
-
flights (from nycflights13)
-
mtcars
-
airquality
-
mpg
π§ Installation
Ensure you have R installed and then install the required libraries:
install.packages(c("dplyr", "tidyr", "ggplot2", "plotly", "nycflights13", "MASS", "grid", "plotrix"))




