---
title: "Data Science with R"
---

This section is centered around the use of the R programming language within the tidy data framework, and as such employs the most recent advances in data analysis coding. The chapter provide a sophisticated first introduction to the field of data science and provide a balanced mix of practical skills along with generalizable principles. 

<style>
.layout-example {
    background: #adb5bd;
    color: #fff;
    text-align: center;
    margin-bottom: 1em;
    font-weight: 600;
    padding: 0.8em 0 0.8em 0;
    border-radius: 3px;
}
</style>


## Chapter {.unnumbered .unlisted}

<h4 class="layout-example">1 Programming Basics</h3>

**[1.1 Introduction to R](topics/01_basics/01_programming_beginner/01_programming_beginner.qmd)**

Master the basics of data analysis by manipulating common data structures such as vectors, matrices, and data frames.

**[1.2 Intermediate R](topics/01_basics/02_programming_intermediate/02_programming_intermediate.qmd)**

Discover conditional statements, loops, and functions to power your own R scripts, and learn to make your R code more efficient using the apply functions.

**[1.3 Introduction to the tidyverse](topics/01_basics/03_programming_tidyverse/03_programming_tidyverse.qmd)**

Get started on the path to exploring and visualizing your own data with the tidyverse, a powerful and popular collection of data science tools within R. Discover the fundamentals of the Tidyverse, and learn all about renaming and reordering variables, while becoming familiar with binomial distribution.

<h4 class="layout-example">2 Importing Data</h3>

**[2.1 Introduction to Importing Data](topics/02_importing_data/01_importing_data_beginner/01_importing_data_beginner.qmd)**

Learn to read .xls, .csv, and text files in R using readxl and gdata, before learning how to use readr and data.table packages to import flat file data.

**[2.2 Intermediate Importing Data](topics/02_importing_data/02_importing_data_intermediate/02_importing_data_intermediate.qmd)**

Parse data in any format. Whether it's flat files, statistical software, databases, or data right from the web.

**[2.3 Working with web Data](topics/02_importing_data/03_working_with_web_data/03_working_with_web_data.qmd)**

Learn how to efficiently import data from the web into R. Discover how to work with APIs, build your own API client, and access data from Wikipedia and other sources by using R to scrape information from web pages.

<h4 class="layout-example">3 Data Wrangling</h3>

**[3.1 Data Manipulation with dplyr](topics/03_data_wrangling/01_data_manipulation_with_dplyr/01_data_manipulation_with_dplyr.qmd)**

Delve further into the Tidyverse by learning to transform and manipulate data with dplyr. Learn how to use dplyr to transform and aggregate data, then add, remove, or change variables. You'll then apply your skills to a real-world case study.

**[3.2 Joining data with dplyr](topics/03_data_wrangling/02_joining_data_with_dplyr/02_joining_data_with_dplyr.qmd)**

Learn to combine data across multiple tables to answer more complex questions with dplyr. Learn to combine data across multiple tables to answer complex questions with dplyr. You'll learn 6 different joins including inner, full, anti, and more.

**[3.3 Exploratory Data Analysis](topics/03_data_wrangling/exploratory_data_analysis_in_r/exploratory_data_analysis_in_r.qmd)**

Learn how to use graphical and numerical techniques for exploratory data analysis while generating insightful and beautiful graphics in R.

**[3.4 Case Study: EDA](topics/03_data_wrangling/case_study_exploratory_data_analysis_in_r/case_study_exploratory_data_analysis_in_r.qmd)**

Use data manipulation and visualization skills to explore the historical voting of the United Nations General Assembly.

**[3.5 Cleaning Data](topics/03_data_wrangling/cleaning_data_in_r/cleaning_data_in_r.qmd)**

Develop the skills you need to go from raw data to awesome insights as quickly and accurately as possible.

**[3.6 Data Manipulation with data.table](topics/03_data_wrangling/data_manipulation_with_datatable/data_manipulation_with_datatable.qmd)**

Master core concepts about data manipulation such as filtering, selecting and calculating groupwise statistics using data.table.

**[3.7 Joining Data with data.table](topics/03_data_wrangling/joining_data_with_datatable/joining_data_with_datatable.qmd)**

This course will show you how to combine and merge datasets with data.table.

<h4 class="layout-example">4 Data Visualization</h3>

**[4.1 Intermediate Data Visualization with ggplot2](topics/04_data_visualization/introduction_to_data_visualization_with_ggplot2/ggplot2_intro.qmd)**

Learn to produce meaningful and beautiful data visualizations with ggplot2 by understanding the grammar of graphics.

**[4.2 Intermediate Data Visualization with ggplot2](topics/04_data_visualization/data_visualization_with_ggplot2_intermediate/ggplot2_intermediate.qmd)**

Learn to use facets, coordinate systems and statistics in ggplot2 to create meaningful explanatory plots.

<h4 class="layout-example">5 Statistics</h3>

**[5.1 Introduction to Statistics](topics/05_statistics/01_statistics_beginner/01_statistics_beginner.qmd)**

Grow your statistical skills and learn how to collect, analyze, and draw accurate conclusions from data. Learn how to work with variables, plotting, and standard deviation in R. It covers histograms, distributions and more.

**[5.2 Foundations of Probability](topics/05_statistics/02_foundations_of_probability_in_r/02_foundations_of_probability_in_r.qmd)**

In this course, you'll learn about the concepts of random variables, distributions, and conditioning. Learn about random variables, distributions and conditioning, while gaining intuition for how to solve probability problems through random simulation.

**[5.3 Introduction to Regression](topics/05_statistics/03_regression_beginner/03_regression_beginner.qmd)**

Learn how you can predict housing prices and ad click-through rate by implementing, analyzing, and interpreting linear and logistic regressions using R.

**[5.4 Intermediate Regression](topics/05_statistics/04_regression_intermediate/04_regression_intermediate.qmd)**

Learn to perform linear and logistic regression with multiple explanatory variables. Discover how to include multiple explanatory variables in a model, how interactions affect predictions, and how linear and logistic regression work in R.

**[5.5 Modeling with Data in the Tidyverse](topics/05_statistics/06_modeling_with_data_in_the_tidyverse/06_modeling_with_data_in_the_tidyverse.qmd)**

Explore Linear Regression in a tidy framework.Discover different types in data modeling, including for prediction, and learn how to conduct linear regression and model assement measures in the Tidyverse.

**[5.6 Experimental Design](topics/05_statistics/09_experimental_design/09_experimental_design.qmd)**

In this course you'll learn about basic experimental design, a crucial part of any data analysis. Learn about basic experimental design, including block and factorial designs, and commonly used statistical tests, such as the t-tests and ANOVAs in R.

**[5.7 A/B Testing](topics/05_statistics/10_ab_testing_in_r/10_ab_testing_in_r.qmd)**

Learn A/B testing: including hypothesis testing, experimental design, and confounding variables.

**[5.8 Fundamentals of Bayesian Data Analysis](topics/05_statistics/19_fundamentals_of_bayesian_data_analysis/19_fundamentals_of_bayesian_data_analysis.qmd)**

Learn what Bayesian data analysis is, how it works, and why it is a useful tool to have in your data science toolbox.

**[5.9 Factor Analysis](topics/05_statistics/21_factor_analysis_in_r/21_factor_analysis_in_r.qmd)**

Explore latent variables, such as personality, using exploratory and confirmatory factor analyses. Start this four-hour course today to discover exploratory factor analysis and confirmatory factor analysis in R to explore latent variables such as personality.

<h4 class="layout-example">7 Machine Learning</h3>

**[7.1 Supervised Learning: Classification](topics/07_machine_learning/01_supervised_learning_classification/01_supervised_learning_classification.qmd)**

Basics of machine learning for classification. This beginner-level introduction to machine learning covers four of the most common classification algorithms. You will come away with a basic understanding of how each algorithm approaches a learning task, as well as learn the R functions needed to apply these tools to your own work.

**[7.2 Supervised Learning: Regression](topics/07_machine_learning/02_supervised_learning_regression/02_supervised_learning_regression.qmd)**

In this course you will learn how to predict future events using linear regression, generalized additive models, random forests, and xgboost.

**[7.3 Unsupervised Learning](topics/07_machine_learning/03_unsupervised_learning/03_unsupervised_learning.qmd)**

This course provides an intro to clustering and dimensionality reduction in R from a machine learning perspective.

**[7.4 Machine Learning in the tidyverse](topics/07_machine_learning/04_machine_learning_in_the_tidyverse/04_machine_learning_in_the_tidyverse.qmd)**

Leverage the tools in the tidyverse to generate, explore and evaluate machine learning models.

**[7.5 Cluster Analysis](topics/07_machine_learning/05_cluster_analysis/05_cluster_analysis.qmd)**

Develop a strong intuition for how hierarchical and k-means clustering work and learn how to apply them to extract insights from your data.

**[7.6 Cluster Analysis](topics/07_machine_learning/06_machine_learning_with_caret/06_machine_learning_with_caret.qmd)**

This course teaches the big ideas in machine learning: how to build and evaluate predictive models, how to tune them for performance, and how to preprocess data.

**[7.7 Modeling with tidymodels](topics/07_machine_learning/07_modeling_with_tidymodels/07_modeling_with_tidymodels.qmd)**

Learn to streamline your machine learning workflows with tidymodels.

**[7.8 Machine Learning with tree-based Models](topics/07_machine_learning/08_machine_learning_with_tree-based_models/08_machine_learning_with_tree-based_models.qmd)**

Learn how to use tree-based models and ensembles to make classification and regression predictions with tidymodels.

**[7.9 Support Vector Machines](topics/07_machine_learning/09_support_vector_machines/09_support_vector_machines.qmd)**

This course will introduce the support vector machine (SVM) using an intuitive, visual approach.

**[7.10 Topic Modeling](topics/07_machine_learning/10_topic_modeling/10_topic_modeling.qmd)**

Learn how to fit topic models using the Latent Dirichlet Allocation algorithm.

**[7.11 Hyperparameter Tuning](topics/07_machine_learning/11_hyperparameter_tuning/11_hyperparameter_tuning.qmd)**

Use the caret, mlr and h2o packages to find optimal hyperparameters using grid search, random search, adaptive resampling and automatic machine learning.

**[7.12 Bayesian Regression Modeling](topics/07_machine_learning/12_bayesian_regression_modeling_with_rstanarm/12_bayesian_regression_modeling_with_rstanarm.qmd)**

Learn how to leverage Bayesian estimation methods to make better inferences about linear regression models.

**[7.13 Introduction to Spark](topics/07_machine_learning/13_spark_with_sparklyr_in_R/13_spark_with_sparklyr_in_R.qmd)**

Learn how to analyze huge datasets using Apache Spark and R using the sparklyr package.