Module 2.1 Report

Author

Ethan Schatz

Module 2.1 Report

A report made to show the findings of module 2.1, completed May 18th, 2026, showing off a dataset about Bird Flu. The goal of this report is to:

  • Show the process of the code
  • Show the results of the code

Process

Step 1: Reading the data into R

birdFlu = read.csv("E:/Summer 2026/data/BirdFlu_deaths.csv")

Step 2: Structure Functions

names(birdFlu)
[1] "Country" "yr2003"  "yr2004"  "yr2005"  "yr2006"  "yr2007"  "yr2008" 
head(birdFlu)
     Country yr2003 yr2004 yr2005 yr2006 yr2007 yr2008
1 Azerbaijan      0      0      0      5      0      0
2 Bangladesh      0      0      0      0      0      0
3   Cambodia      0      0      4      2      1      0
4      China      1      0      5      8      3      3
5   Djibouti      0      0      0      0      0      0
6      Egypt      0      0      0     10      9      3
str(birdFlu)
'data.frame':   15 obs. of  7 variables:
 $ Country: chr  "Azerbaijan" "Bangladesh" "Cambodia" "China" ...
 $ yr2003 : int  0 0 0 1 0 0 0 0 0 0 ...
 $ yr2004 : int  0 0 0 0 0 0 0 0 0 0 ...
 $ yr2005 : int  0 0 4 5 0 0 13 0 0 0 ...
 $ yr2006 : int  5 0 2 8 0 10 45 2 0 0 ...
 $ yr2007 : int  0 0 1 3 0 9 37 0 2 0 ...
 $ yr2008 : int  0 0 0 3 0 3 15 0 0 0 ...

Step 3: Row containing the highest number of deaths for 2005

which(birdFlu$yr2005 == max(birdFlu$yr2005))
[1] 15

Step 4: Finding the country with the highest death

#Step 4: 
birdFlu[15, 1]
[1] "Vietnam"

Step 5: Putting it all together

which(birdFlu$yr2007 == max(birdFlu$yr2007))
[1] 7
birdFlu[7, 1]
[1] "Indonesia"