# Load the dataset
Covid.Vaccinations <- read.csv("C:\\Users\\USER21\\Downloads\\Covid Vaccinations.csv")
data <- Covid.Vaccinations

#1. Scatter Plot

# Scatter Plot of Vaccinations vs New Deaths
# Compare total_vaccinations with New_deaths to assess if higher vaccinations correlate with fewer  deaths.
plot(Covid.Vaccinations$total_vaccinations, Covid.Vaccinations$New_deaths,
     main = "Scatter Plot of Vaccinations vs New Deaths", 
     xlab = "Total Vaccinations)", 
     ylab = "New Deaths", 
     pch = 16, col = "red")

This plot shows the relationship between Total Vaccinations (x-axis) and New Deaths (y-axis). Initially, when total vaccinations are low, the number of new deaths fluctuates significantly, reaching values as high as 12,000. As the total vaccinations increase, the number of new deaths generally decreases and stabilizes closer to zero.

#2. Histogram

# A histogram of ratio to show the distribution of vaccination coverage across the dataset.
ggplot(Covid.Vaccinations, aes(x = ratio)) +
  geom_histogram(binwidth = 0.2, fill = "red", color = "blue") +
  labs(title = "Histogram of Distribution of Vaccination Ratios",
       x = "Vaccination Ratio",
       y = "Frequency")

This histogram shows the distribution of vaccination ratios within a dataset.The distribution is right-skewed, meaning most of the data points are clustered around low vaccination ratios or It shows that low vaccination ratios are more common than high ones.

#3. Line Plot

#Line Plot for Vaccination Trends
#Plot the total_vaccinations or people_vaccinated over time (date).This will show how vaccinations progressed over time
ggplot(Covid.Vaccinations, aes(x = date, y = total_vaccinations)) +
  geom_line(color = "blue") +
  labs(title = "Total Vaccinations Over Time",
       x = "Date",
       y = "Total Vaccinations")

This is a graph showing the total number of vaccinations over time. It shows a continuous increase in the number of vaccinations over the given period.

#4. Bubble Plot

# Bubble Plot of New Deaths vs. Total Vaccinations, Size by Population
ggplot(Covid.Vaccinations, aes(x = total_vaccinations, y = New_deaths, size = population, color = ratio)) +
  geom_point(alpha = 0.6) +
  scale_size(range = c(1, 2)) + 
  labs(
    title = "Bubble Plot: Total Vaccinations vs New Deaths",
    x = "Total Vaccinations",
    y = "New Deaths",
    size = "Population",
    color = "Ratio"
  ) +
  theme_minimal()

The graph shows the relationship between total vaccinations and new deaths. As the number of total vaccinations increases, the number of new deaths generally decreases.

#5. Bar Plot

#Bar Plot for Vaccination Ratios
# To Plot the ratio to show changes over time.
ggplot(Covid.Vaccinations, aes(x = as.Date(date), y = ratio)) +
  geom_bar(stat = "identity", fill = "skyblue") +
  labs(title = "Vaccination Ratio Over Time",
       x = "Date",
       y = "Ratio")

This graph shows the vaccination ratio over time, with the x-axis representing the date and the y-axis showing the ratio.The ratio steadily increases, indicating more people getting vaccinated over time.