This data is from the United States Geological Survey’s Aquatic Invasive Species Database. The full data details reported instances of aquatic invasive species all over the country as well as what the outcome of these reports was.
ais_data <- read.csv("NAS-Data-Download.csv")
I seek to specifically focus on the state of Arizona and the years of 1990 to the present day.
This can be done by simply filtering the data first.
ais_timeframe <- ais_data %>%
filter(Year > 1989)
This filter data now shows us the timeframe we are looking for as well as the state we are looking in.
From here, we should filter out species that have been wiped out as well as selecting only the important columns.
ais_timeframe_v2 <- ais_timeframe %>%
select ("Specimen.Number", "Species.ID", "Group", "Family", "Scientific.Name", "Common.Name", "State", "County", "Locality", "Latitude", "Longitude", "Source", "Accuracy", "Drainage.Name", "Year", "Month", "Day", "Status", "record_type", "disposal", "Comments") %>%
filter(Status == "established")
Next, we want to filter out the entries for plants and invertebrate species such as tapeworms.
ais_final <- ais_timeframe_v2 %>%
filter (Group != "Plants") %>%
filter (Group != "Platyhelminthes")
Finally, we filter out certain species that are not relevant to the analysis due to extenuating circumstances.
ais_final_v2 <- ais_final %>%
filter (Common.Name != "Desert Pupfish") %>%
filter (Common.Name != "Gila Topminnow") %>%
filter (Common.Name != "Rio Grande Leopard Frog") %>%
filter (Common.Name != "Sonoyta Pupfish")
Finally, we have exactly the data we are looking for. We now need to order it by year to see the comprehensive breakdown.
ais_ordered_final <- ais_final_v2 %>%
arrange(ais_final_v2 $ Year)
From here we can do sum counts by year to see if there has been an increase as well as sum counts by species to see if there has been many reports of certain species in different drainages to establish their prevalence in the state as a whole.
ais_count_year <- count(ais_ordered_final, Year) %>%
arrange (Year)
ais_count_species <- count(ais_ordered_final, Common.Name) %>%
arrange(n)
ais_count_drainage <- count(ais_ordered_final, Drainage.Name) %>%
arrange(n)
ais_count_year_species <- count (ais_ordered_final, Common.Name, Year) %>%
arrange (n)
ais_count_species_drainage <- count (ais_ordered_final, Common.Name, Drainage.Name) %>%
arrange (n)
ais_count_year_drainage <- count (ais_ordered_final, Drainage.Name, Year) %>%
arrange (Year)
Here are the final data frames that will be useful.
head(ais_ordered_final)
## Specimen.Number Species.ID Group Family Scientific.Name
## 1 1409326 92 Mollusks-Bivalves Cyrenidae Corbicula fluminea
## 2 1322267 92 Mollusks-Bivalves Cyrenidae Corbicula fluminea
## 3 27691 518 Fishes Cyprinidae Cyprinella lutrensis
## 4 27343 861 Fishes Poeciliidae Poecilia mexicana
## 5 324249 733 Fishes Ictaluridae Ameiurus natalis
## 6 324326 733 Fishes Ictaluridae Ameiurus natalis
## Common.Name State County
## 1 Asian clam AZ Coconino
## 2 Asian clam AZ Maricopa
## 3 Red Shiner AZ Pinal
## 4 Shortfin Molly AZ
## 5 Yellow Bullhead AZ Gila
## 6 Yellow Bullhead AZ Pinal
## Locality Latitude Longitude
## 1 Wahweap Creek, in Lake Powell (ca. 8 km nnw Page) 36.99100 -111.4854
## 2 Lake Pleasant [N of Phoenix] 33.85333 -112.2686
## 3 Arivapa Creek 32.86719 -110.5954
## 4 state non-specific 34.29323 -111.6646
## 5 Gila River, Christmas 33.06364 -110.7227
## 6 Lower Gila River, Box O Wash 33.08478 -111.2123
## Source Accuracy Drainage.Name Year Month Day
## 1 reported Accurate Lower Lake Powell 1990 4 NA
## 2 reported Accurate Aqua Fria 1990 2 1
## 3 Map derived Accurate Lower San Pedro 1990 10 NA
## 4 Calculated by GIS Centroid Lower Colorado Region 1990 NA NA
## 5 Map derived Approximate Middle Gila 1991 NA NA
## 6 GNIS Approximate Middle Gila 1991 NA NA
## Status record_type disposal Comments
## 1 established Specimen preserved dry
## 2 established Specimen Florida Museum of Natural History
## 3 established Literature
## 4 established Personal communication
## 5 established Literature
## 6 established Literature
head(ais_count_year)
## Year n
## 1 1990 4
## 2 1991 48
## 3 1992 38
## 4 1993 41
## 5 1994 70
## 6 1995 148
head(ais_count_species)
## Common.Name n
## 1 Acuta bladder snail 1
## 2 African Clawed Frog 1
## 3 Blue Catfish 1
## 4 Blue Tilapia 1
## 5 Chinese mysterysnail 1
## 6 Eastern Spiny Softshell 1
head(ais_count_drainage)
## Drainage.Name n
## 1 Carrizo 1
## 2 Lower Colorado-Lake Mead 1
## 3 Lower Gila-Painted Rock Reservoir 1
## 4 Upper Gila 1
## 5 Lower Colorado Region 2
## 6 Upper Little Colorado 2
head(ais_count_year_species)
## Common.Name Year n
## 1 Acuta bladder snail 2004 1
## 2 African Clawed Frog 1995 1
## 3 American Bullfrog 1997 1
## 4 American Bullfrog 2002 1
## 5 Arctic Grayling 2004 1
## 6 Asian clam 1993 1
head(ais_count_species_drainage)
## Common.Name Drainage.Name n
## 1 Acuta bladder snail Lower Gila 1
## 2 African Clawed Frog Upper Santa Cruz 1
## 3 American Bullfrog Aqua Fria 1
## 4 American Bullfrog Bill Williams 1
## 5 American Bullfrog Grand Wash 1
## 6 American Bullfrog Lower Gila 1
head(ais_count_year_drainage)
## Drainage.Name Year n
## 1 Aqua Fria 1990 1
## 2 Lower Colorado Region 1990 1
## 3 Lower Lake Powell 1990 1
## 4 Lower San Pedro 1990 1
## 5 Aguirre Valley 1991 1
## 6 Imperial Reservoir 1991 2
ais_count_largemouth <- ais_count_species_drainage %>%
filter (Common.Name == "Largemouth Bass")
ais_count_carp <- ais_count_species_drainage %>%
filter (Common.Name == "Common Carp")
ais_count_goldfish <- ais_count_species_drainage %>%
filter (Common.Name == "Goldfish")