2025-10-31

The Dataset

-This is a project that uses the bird dataset from Kaggle.

-The data set was created from skeletal measurements collected by the Natural History Museum of Los Angeles County, spanning 21 orders, 153 genera, and 245 species.

-The data set has 12 columns, the major ones including length and width measurements for five types of bird bones: Humerus, Ulna, Femur, Tibiotarsus, and Tarsometatarsus. All measurements are continuous float numbers (mm).

Brief Overview

We are going to explore the data through different visualizations to better understand and analyze the data. The following is the layout:

  • Pie Chart: Distribution of bird types in the dataset to understand representation.

  • Heatmap: Correlation matrix between bone measurements to identify relationships.

  • Grouped Bar Chart: Wing to leg ratio comparison across bird types.

  • Box Plot: Distribution of bone robustness index by bird type.

  • 3D Visualization: Interactive plot showing wing vs leg bone relationships.

  • Statistical Analysis: Five number summary of key measurements by bird type.

Distribution of Bird Types

By examining the data through a pie chart, we observe that the dataset is unevenly distributed among the 6 ecological bird groups. Singing birds (SO) are the most represented with 30% of the dataset, while Terrestrial birds (T) are the least represented with only 5.57%. This distribution may affect our analysis and should be considered.

Code Example: Pie Chart

To show the breakdown of the groups in the data set, a pie chart was used. This is the code for the pie chart:

count <- bird %>%
  filter(is.null(type) == FALSE, type != "null") %>%
  group_by(type) %>%
  summarise(n = n())

count_plot <- plot_ly(count, labels = ~type, 
                      values = ~n, type = 'pie', 
                      textposition = 'inside', 
                      textinfo = 'label+percent', 
                      hoverinfo = 'text', 
                      text = ~paste(type, n))

count_plot <- count_plot %>% 
  layout(title = 'Bird Types by Percentage')

Correlation Heatmap

This heatmap displays the correlation coefficients between all bone measurements. Darker colors indicate stronger positive correlations. There are signs of strong correlations between bones of the same limb (e.g. Humerus and Ulna are highly correlated). This suggests proportional growth patterns within wing and leg structures.

Wing to Leg Ratio by Bird Type

The wing-to-leg ratio is calculated by dividing total wing length by total leg length. A higher ratio indicates relatively longer wings, while a lower ratio suggests larger legs. The chart displays the average ratio for each bird type. Swimming birds show the highest ratio reflecting their need for powerful wings for swimming. Wading birds have the lowest ratio with proportionally longer legs for foraging in shallow water.

Bone Robustness Index

The robustness index measures how thick bones are relative to their length, calculated as the ratio of bone width to bone length. A higher robustness index indicates stockier, more robust bones, while a lower index suggests more slender bones. We focus on the Femur robustness as it reflects the structural demands placed on the primary weight-bearing bone.

Femur Robustness Distribution

We focus on the Femur robustness as it reflects the structural demands placed on the primary weight bearing bone. The plot shows the distribution of Femur robustness index across bird types. Raptors and Swimming birds show higher robustness values indicating thicker bones relative to length.

3D Visualization

This 3D scatter plot compares total wing bone length against total leg bone length, with the third dimension showing the wing to leg ratio.

3D Plot Analysis

The 3D visualization reveals distinct clustering of bird types based on limb proportions. Wading birds (W) cluster toward higher leg length values with lower wing to leg ratios, adapted for standing and foraging in water. Swimming birds (SW) show high ratios with robust wing structures. Raptors (R) maintain moderate ratios but tend toward larger absolute sizes in both dimensions. Terrestrial birds (T) show moderate values across all dimensions, while Singing birds (SO) cluster at the lower ranges with variable ratios, consistent with their smaller body sizes and diverse flight styles.

Statistical Analysis

The five number summary compares the distribution of wing to leg ratio across bird types.

## # A tibble: 6 × 6
##   type    Min    Q1 Median    Q3   Max
##   <chr> <dbl> <dbl>  <dbl> <dbl> <dbl>
## 1 P     0.406 0.711  0.863 0.920 1.49 
## 2 R     0.638 0.785  0.849 0.916 1.31 
## 3 SO    0.470 0.541  0.575 0.628 0.805
## 4 SW    0.477 0.919  1.10  1.40  3.30 
## 5 T     0.465 0.493  0.538 0.744 0.868
## 6 W     0.459 0.737  0.856 1.16  1.48

Conclusion

Our analysis shows that bird skeletons are shaped by their environment. We found that wing and leg bones develop proportionally within their limbs, but the ratio between wings and legs is highly adaptable. This allows for distinct specializations like how swimming birds have strong wings and raptors powerful legs. Statistically, each group occupies a unique morphological space, confirming that skeletal structure evolves in response to habitat and behavior.