Homework5_Wilson

Computing descriptive statistics and creating visualizations for primate data

Thomas Wilson
2/24/2022

This dataset contains raw and corrected rates of primate behavioural innovation, tool use, extractive foraging, social learning and research effort

Citation: The evolution of primate general and cultural intelligence. Reader SM, Hager Y & Laland KN. Philosophical Transactions of the Royal Society B, 2011 366:1017-1027

Variables include: Species name, Taxon, Great Ape (y/n?), Times of recorded observations of: Innovation, Tool use, Extractive foraging, and Social learning.

Data_ReaderHagerLalandPhilTrans2011 <- read_csv("Data_ReaderHagerLalandPhilTrans2011.csv")
View(Data_ReaderHagerLalandPhilTrans2011)
Primate_ToolUse <- Data_ReaderHagerLalandPhilTrans2011

#Removed columns that weren't useful to potential research questions
Primate_ToolUse <- Primate_ToolUse[-c(3,4,11:13,15:20)]
view(Primate_ToolUse)

#Calculate the mean tool use for the Cebus genus
Primate_ToolUse %>%
  filter(!str_detect('Cebus', Species)) %>%
  summarise(mean(`Tool use`))
# A tibble: 1 x 1
  `mean(\`Tool use\`)`
                 <dbl>
1                 2.76
#Calculte the max times a prosimian was searched in journals
Primate_ToolUse %>%
  filter(!str_detect('Prosimian', Taxon)) %>%
  summarise(max(`Journal Search Article Count`, na.rm = TRUE))
# A tibble: 1 x 1
  `max(\`Journal Search Article Count\`, na.rm = TRUE)`
                                                  <dbl>
1                                                   365
Primate_ToolUse %>%
  filter(!str_detect('Great', `Great ape`)) %>%
  summarise(mean(Innovation), max(`Tool use`), median(`Extractive foraging`))
# A tibble: 1 x 3
  `mean(Innovation)` `max(\`Tool use\`)` `median(\`Extractive foragin…
               <dbl>               <dbl>                         <dbl>
1               2.47                 371                             0
#Graphing Mean of Tool Use Grouped by Great Ape or Not
ToolUse_Means <- Primate_ToolUse %>%
  group_by(`Great ape`) %>%
  summarise(Tool_Use = mean(`Tool use`))

ggplot(ToolUse_Means, aes(x= `Great ape`, y= `Tool_Use`, fill= `Great ape`)) +
  geom_bar(stat = "Identity") +
  labs(title = "Mean Tool Use", y = "Mean of Tool Use", x = "Type of Primate") +
  theme_light()
#Graphing Social Learning Across Genera
Social_Means <- Primate_ToolUse %>%
  group_by(`Genus`) %>%
  summarise(Social_Learning = mean(`Social learning`)) 
  

ggplot(Social_Means, aes(x= `Genus`, y= `Social_Learning`)) +
  geom_bar(stat = "Identity") +
  labs(title = "Social Learning Means Across Genera", y = "Social Learning Mean", x = "Genus") +
  theme_light() +
  theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1))

This graph helps show how common social learning is across genera. It might help to make arguments that primates exhibit “culture”. Furthermore, you can use this information if you were trying to pick a species to investigate learned behaviors.

Primate_ToolUse %>%
  filter(grepl('Great', `Great ape`)) %>%
  ggplot(aes(x=Species, y=`Social learning`)) +
  geom_point() +
  labs(title = "Number of Times Social Learning was Observed in Great Apes", y = "Number of Observations", x = "Species Name") +
  theme_bw() 
Primate_ToolUse %>%
  filter(grepl('Callicebus', `Species`)) %>%
  ggplot(aes(x=Species, y= `Journal Search Article Count`)) +
  geom_point() +
  labs(title = "Number of Journal Searches for Titi Monkeys ", y = "Number of Searches", x = "Species Name") +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

Data from: Female reproductive aging in seven primate species: patterns and consequences

Citation: Campos, F., Altmann, J., Cords, M., Fedigan, L., Lawler, R., Lonsdorf, E., Stoinski, T., Strier, K., Bronikowski, A., Pusey, A., & Alberts, S. (2021). Data from: Female reproductive aging in seven primate species: patterns and consequences. Duke Research Data Repository.

The following data is looking at age-related chancles in female reproductive performance of seven primate populations. The variables include: Genus, ID of female born, Age of mother at birth, How long new infants are at risk, Mother ID, If the mother has had other births, and Population the individual was born into.

FemalePrimate_Reproduction <- read_csv("03_afr.csv")
view(FemalePrimate_Reproduction)

#Graphing


FemalePrimate_Reproduction %>%
  filter(!str_detect('Sifaka', `species`)) %>%
 ggplot(aes(x=`mom_age_years`)) +
  geom_histogram() +
  labs(title = "Age of Mother at Birth", x = "Mother's Age", y= "Frequency") +
  theme_bw(base_size = 10) +
  theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1))
FemalePrimate_Reproduction %>%
  ggplot(aes(x=`mom_parity`, fill= mom_parity)) +
  geom_bar() +
  labs(title = "Female Parity", y = "Number of Mothers", x = "Mother Parity") +
  theme_classic(base_size = 10) +
  theme(axis.text.x = element_text(vjust = 0.5, hjust=1)) +
  facet_wrap(vars(species))

Shows how common/easy it is for females to have multiple births. Using this data you can start to understand interbirth interval, but you can also use this information to set up experiments to calculate how long it takes for infants to become independent from their mother. This data set would be much more useful if we had the time of mother-dependence.

A lot of limitations are that there is no direct column or data that focuses on time. Another column could be added to the data that shows the number of births per population/birth group over time.

```{.r .distill-force-highlighting-css}

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Wilson (2022, Feb. 27). Data Analytics and Computational Social Science: Homework5_Wilson. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomtcwilso3hw5twilson/

BibTeX citation

@misc{wilson2022homework5_wilson,
  author = {Wilson, Thomas},
  title = {Data Analytics and Computational Social Science: Homework5_Wilson},
  url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomtcwilso3hw5twilson/},
  year = {2022}
}