I’ve been working with the famous iris dataset, which contains measurements of different characteristics of iris flowers from three species: setosa, versicolor, and virginica. The dataset includes variables like Sepal.Length, Sepal.Width, Petal.Length, and Petal.Width, all measured in centimeters.

iris <- iris %>%
  group_by(Species) %>%
  mutate(sepal_length_range = cog(diff(range(Sepal.Length)),
                                  desc = "Range of Sepal Length values"))

Including Plots

In this assignment, I’m graphing Sepal.Length (y-axis) against Sepal.Width (x-axis), with the data points colored by Species. This plot helps me visualize the relationship between sepal length and sepal width for each iris species. I decided to facet the plot by Species because I wanted to investigate if there are any differences or patterns in the sepal length and width distributions across the three species. By separating the data into individual panels based on the Species variable, I can more easily compare and contrast the characteristics of each species.

ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
  geom_point() +
  facet_trelliscope(~ Species, nrow = 1, path = "trelliscope") +
  labs(title = "Sepal Length vs Sepal Width",
       x = "Sepal Width (cm)", y = "Sepal Length (cm)")
## using data from the first layer

One trend I’m trying to explore is whether there is a clear separation or clustering of the species based on their sepal measurements. If the species exhibit distinct patterns or ranges of sepal length and width, it could potentially help in identifying or classifying iris flowers based on these characteristics. Creating these graphs wasn’t without challenges. One issue I faced was overlapping data points, especially when there were many observations with similar sepal measurements within a species. This made it difficult to discern individual points and patterns. To address this, I considered adding some transparency (alpha) to the points or using a different geom, like geom_jitter(), to introduce a small amount of random noise and reduce overplotting. One cognostic measure that caught my attention is the range of sepal length values within each species. This cognostic measure calculates the difference between the maximum and minimum sepal length values for each species, giving me insight into the variability or spread of sepal length measurements within each group. By examining the sepal length range cognostic, I could potentially identify species with a wider or narrower range of sepal length values. A larger range could indicate greater variability within that species, while a smaller range might suggest more consistent sepal length measurements. This information could be useful for understanding the natural variation within each species and potentially aiding in species identification or classification based on sepal length characteristics. .