# Load the ggplot2 library
library(ggplot2)
# Create a sample dataset
<- data.frame(
data X = c(1, 2, 3, 4, 5),
Y = c(2, 3, 1, 4, 2)
)
# Create a scatter plot
ggplot(data, aes(x = X, y = Y)) +
geom_point(shape = 19, size = 3, color = "blue") +
labs(
title = "Simple Scatter Plot",
x = "X-axis",
y = "Y-axis"
)
1 Assignment 1
1.1 Who is Derya?
I’m Derya Şaşmaz. I’m currently working at Sigortam.net as CX & Process Developer. Data-driven decision making is the key for my role. I use data to prioritize the tasks and analyze cost-benefits for all projects.
Feel free to connect with me!
1.2 Posit Videos
I choose “Data Visualization and Plotting with Shiny for Python” and “Shiny Programming Practices” videos. The main reason is my interest in data visualization, especially at work. After learning some about Shiny, I decided to watch the second video too.
1.2.1 Data Visualization and Plotting with Shiny for Python
In the first video, there is a discussion about the development of an interactive web application using Shiny, a web application framework for R, and its integration with various data visualization tools. It covers creating interactive applications with Shiny, explaining reactive calculations, using the render plot function for data visualization, introducing its wide compatibility with different packages, and providing practical code examples for using visualization libraries within the Shiny application.
1.2.2 Shiny Programming Practices
The second video reflects on the author’s experiences building UIs using traditional event-driven methods. It mentions the concept of a “reactive graph” in frameworks like Shiny for R. He draws an analogy between functions and reactive components, explains the need for modules to be easily understandable.
1.3 Dataset
1.3.1 Netflix Movies and TV Shows
“Netflix Movies and TV Shows” is a great data to analyze. Netflix is one of the most popular media and video streaming platforms. They have over 8000 movies or tv shows available on their platform.
The dataset provides details about a wide range of movies and TV shows available on Netflix, including information about their release year, rating, duration, and more. It’s a comprehensive dataset for exploring the Netflix content library.
This dataset offers an engaging and relevant way to teach data analysis, data visualization, and recommendation systems, all within the context of a popular streaming platform. I believe it allows students to work with real-world data while learning valuable data science skills.
1.4 R Posts
1.4.1 Data Visualization with ggplot2
This helps to create a simple scatter plot using the ggplot2 package to visualize data.
1.4.2 Basic Data Frame Creation
This example shows how to create a basic data frame in R.
# Create a basic data frame
<- data.frame(
data Name = c("Alice", "Bob", "Charlie", "David"),
Age = c(25, 30, 22, 28),
Grade = c("A", "B", "B", "A")
)
# Print the data frame
data
Name Age Grade
1 Alice 25 A
2 Bob 30 B
3 Charlie 22 B
4 David 28 A
1.4.3 Basic Arithmetic Operations
Some basic arithmetic operation examples with two variables.
# Define two variables
<- 5
a <- 3
b
# Addition
<- a + b
sum_ab cat("Sum of a and b: ", sum_ab, "\n")
Sum of a and b: 8
# Subtraction
<- a - b
diff_ab cat("Difference between a and b: ", diff_ab, "\n")
Difference between a and b: 2
# Multiplication
<- a * b
product_ab cat("Product of a and b: ", product_ab, "\n")
Product of a and b: 15
# Division
<- a / b
quotient_ab cat("Division of a by b: ", quotient_ab, "\n")
Division of a by b: 1.666667
# Exponentiation
<- a^b
power_ab cat("a raised to the power of b: ", power_ab, "\n")
a raised to the power of b: 125