Assignment_1_Rishabh_arora

.docx

School

Conestoga College *

*We aren’t endorsed by this school

Course

8010

Subject

Anthropology

Date

Feb 20, 2024

Type

docx

Pages

8

Uploaded by UltraWater15179

Report
Assignment_1_Rishabh_arora.R Rishabh Arora 2024-01-30 library (ggplot2) library (dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union file_path <- "C:/Users/Rishabh Arora/Downloads/africanelephants.xlsx" africanelephants <- readxl :: read_excel (file_path) #Q1.1 geometric mean for annual change from 1979 to 1989 africanelephants $ change_79to89 <- ((africanelephants $ ` 1989 Elephant Population ` / africanelephants $ ` 1979 Elephant Population ` ) ^ ( 1 / 10 ) - 1 ) * 100 print (africanelephants) ## # A tibble: 14 × 6 ## Country 1979 Elephant Popula…¹ 1989 Elephant Popula…² 2007 Elephant Popula…³ ## <chr> <dbl> <dbl> <dbl> ## 1 Angola 12400 12400 2530 ## 2 Botswana 20000 51000 175487 ## 3 Cameroon 16200 21200 15387 ## 4 Cen Afr… 63000 19000 3334 ## 5 Chad 15000 3100 6435 ## 6 Congo 10800 70000 22102 ## 7 Dem Rep… 377700 85000 23714
## 8 Gabon 13400 76000 70637 ## 9 Kenya 65000 19000 31636 ## 10 Mozambi… 54800 18600 26088 ## 11 Somalia 24300 6000 70 ## 12 Tanzania 316300 80000 167003 ## 13 Zambia 150000 41000 29231 ## 14 Zimbabwe 30000 43000 99107 ## # abbreviated names: ¹ `1979 Elephant Population`, ## # ²`1989 Elephant Population`, ³`2007 Elephant Population` ## # 2 more variables: `2012 Elephant Population` <dbl>, change_79to89 <dbl> ## based on geometric mean calculated Congo and Gabon saw the significant increase in elephant population from 1979 to 1989 #Q1.2 geometric mean for annual change from 1989 to 2007 over 18 years africanelephants $ change_89to07 <- ((africanelephants $ ` 2007 Elephant Population ` / africanelephants $ ` 1989 Elephant Population ` ) ^ ( 1 / 18 ) - 1 ) * 100 print (africanelephants) ## # A tibble: 14 × 7 ## Country 1979 Elephant Popula…¹ 1989 Elephant Popula…² 2007 Elephant Popula…³ ## <chr> <dbl> <dbl> <dbl> ## 1 Angola 12400 12400 2530 ## 2 Botswana 20000 51000 175487 ## 3 Cameroon 16200 21200 15387 ## 4 Cen Afr… 63000 19000 3334 ## 5 Chad 15000 3100 6435 ## 6 Congo 10800 70000 22102 ## 7 Dem Rep… 377700 85000 23714 ## 8 Gabon 13400 76000 70637 ## 9 Kenya 65000 19000
31636 ## 10 Mozambi… 54800 18600 26088 ## 11 Somalia 24300 6000 70 ## 12 Tanzania 316300 80000 167003 ## 13 Zambia 150000 41000 29231 ## 14 Zimbabwe 30000 43000 99107 ## # abbreviated names: ¹ `1979 Elephant Population`, ## # ²`1989 Elephant Population`, ³`2007 Elephant Population` ## # 3 more variables: `2012 Elephant Population` <dbl>, change_79to89 <dbl>, ## # change_89to07 <dbl> ##from the year 1989 to 2007 Somalia saw the biggest decrease in elephant population #Q1.3 geometric mean for annual change from 2007 to 2012 over 5 years africanelephants $ change_07to12 <- ((africanelephants $ ` 2012 Elephant Population ` / africanelephants $ ` 2007 Elephant Population ` ) ^ ( 1 / 5 ) - 1 ) * 100 print (africanelephants) ## # A tibble: 14 × 8 ## Country 1979 Elephant Popula…¹ 1989 Elephant Popula…² 2007 Elephant Popula…³ ## <chr> <dbl> <dbl> <dbl> ## 1 Angola 12400 12400 2530 ## 2 Botswana 20000 51000 175487 ## 3 Cameroon 16200 21200 15387 ## 4 Cen Afr… 63000 19000 3334 ## 5 Chad 15000 3100 6435 ## 6 Congo 10800 70000 22102 ## 7 Dem Rep… 377700 85000 23714 ## 8 Gabon 13400 76000 70637 ## 9 Kenya 65000 19000 31636 ## 10 Mozambi… 54800 18600
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help