Import Your Data

In the following code hunk, import your data.

file_path <- "C:/Users/yijun/Documents/education_dataset.csv"

# Read the CSV file into a data frame
education_data <- read.csv(file_path)

# Display the structure of the imported data
str(education_data)
## 'data.frame':    11000 obs. of  6 variables:
##  $ Year                 : int  2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 ...
##  $ State                : chr  "California" "New York" "Texas" "Florida" ...
##  $ LiteracyRate         : num  82.2 83.8 92.8 85.4 85.6 ...
##  $ Enrollment           : num  526779 460064 527688 376633 575357 ...
##  $ GraduationRate       : num  73.6 90.7 83.2 86.4 89.7 ...
##  $ StandardizedTestScore: num  1220 1226 1276 1232 1065 ...

Part 1

Part 1: Point Plot - Trends in Literacy Rates over Time for California

Figure 1 Description: This point plot illustrates the trends in literacy rates over time for the state of California. Each point represents the literacy rate in a specific year, providing a visual representation of changes over the specified time period.

fig_dat1 <- education_data %>%
  filter(State == "California") %>%
  ggplot(aes(x = Year, y = LiteracyRate, color = State)) +
  geom_point() +
  labs(title = "Trends in Literacy Rates over Time",
       subtitle = "For the State of California",
       x = "Year",
       y = "Literacy Rate",
       caption = "Source: Larger Education Dataset")
fig_dat1

Part 2

Part 2: Heatmap - Correlation between Graduation Rate and Standardized Test Score

Figure 2 Description: This heatmap illustrates the correlation between graduation rates and standardized test scores. Darker areas represent higher counts, indicating the frequency of data points in specific regions of the plot. The figure provides insights into the relationship between graduation rates and test scores.

fig_dat2 <- education_data %>%
  ggplot(aes(x = GraduationRate, y = StandardizedTestScore)) +
  geom_bin2d(binwidth = c(5, 50), aes(fill = ..count..)) +
  scale_fill_viridis_c() +
  labs(title = "Correlation between Graduation Rate and Standardized Test Score",
       x = "Graduation Rate",
       y = "Standardized Test Score",
       caption = "Source: Larger Education Dataset")
fig_dat2
## Warning: The dot-dot notation (`..count..`) was deprecated in ggplot2 3.4.0.
## ℹ Please use `after_stat(count)` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

Part 3

Box Plot - Distribution of Standardized Test Scores

Figure 3 Description: This box plot displays the distribution of standardized test scores across different states. The plot provides insights into the variability and central tendency of test scores in each state.

fig_dat3 <- education_data %>%
  ggplot(aes(x = State, y = StandardizedTestScore, fill = State)) +
  geom_boxplot() +
  labs(title = "Distribution of Standardized Test Scores by State",
       x = "State",
       y = "Standardized Test Score")
fig_dat3