Exploratory Data Analysis with R

Data Visualization Basics

Learn how to create basic visualizations of your data

Course Sections

Data Visualization Basics

Visualizing data is a crucial part of exploratory data analysis. It allows us to see patterns and relationships that might not be apparent from summary statistics alone. In this section, we’ll create some basic visualizations of our ice cream data.

8. Create a visualization that shows the ice cream flavours with their ratings

Exercise 3.1: Basic Bar Chart

Create a basic bar chart showing ice cream flavors and their ratings:

Ice Cream Ratings Bar Chart

This chart is a good start, but we can improve it by ordering the flavors from highest to lowest rating. We’ll use the reorder() function to do this.

Exercise 3.2: Ordered Bar Chart

Create an ordered bar chart of ice cream flavors and their ratings:

Ordered Ice Cream Ratings Bar Chart

Now let’s create a similar visualization for the prices of our ice cream flavors.

Exercise 3.3: Visualize Ice Cream Prices

Create an ordered bar chart of ice cream flavors and their prices:

Ice Cream Prices Bar Chart

These visualizations give us a clear picture of how our ice cream flavors compare in terms of ratings and prices. In the next section, we’ll start exploring our sales data.