Homework4_Wilson

Computing descriptive statistics and creating visualizations

Thomas Wilson
2/17/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(grepl('Cebus', Species)) %>%
  summarise(mean(`Tool use`))
# A tibble: 1 x 1
  `mean(\`Tool use\`)`
                 <dbl>
1                 19.2
#Calculte the max times a prosimian was searched in journals
Primate_ToolUse %>%
  filter(grepl('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                                                    44
Primate_ToolUse %>%
  filter(grepl('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               102.                 371                          18.5
#Graphing
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

#Shows the age of mothers when giving birth to the following female sifakas. This graph helps us see how old most sifaka are when they give birth. This can be used with the number of multiparious females to see how often sifaka are having children - calculating the interbirth index. 
FemalePrimate_Reproduction %>%
  filter(grepl('Sifaka', `species`)) %>%
 ggplot(aes(x= as.character(female_id), y=`mom_age_years`)) +
  geom_point() +
  labs(title = "Age of Mother at Birth", y = "Mother's Age", x = "Female ID") +
  theme_bw(base_size = 10) +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
FemalePrimate_Reproduction %>%
  filter(grepl('Sifaka', `species`)) %>%
  ggplot(aes(x=`mom_parity`)) +
  geom_bar() +
  labs(title = "Female Parity in Sifaka", y = "Number of Mothers", x = "Mother Parity") +
  theme_classic(base_size = 20)
#These figures are useful, but limited to only showing how many individuals have had multiple births, but another visual would be needed to highlight exactly which mother have had mutplie births.

#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.

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. 20). Data Analytics and Computational Social Science: Homework4_Wilson. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomtcwilso3hw4twilson/

BibTeX citation

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