--- title: "Poster Visualizations" author: "Chris" date: "2023-12-18" output: html_document output: html_document: theme: readable highlight: zenburn toc: true toc_float: true number_sections: true code_folding: show code_download: true editor: markdown: wrap: 72 --- ```{r} #load packages library(data.table) library(dplyr) library('ggplot2') library("indicspecies") library(kableExtra) library(knitr) library(RColorBrewer) library(tidyr) library(tidyverse) library(vegan) ``` ```{r} #load data algae<- read.csv("algaefull.csv") head(algae) ``` ```{r} #pie charts for algae #clean up the data first ``` ```{r} df <- algae[1:482, ] %>% select(-NUMBER, -ASSIGNED_NUMBER) rockweed_section1_L <- df %>% filter(SECTION == 1, ZONATION == 'L') %>% summarise(rockweed_sum = sum(ROCKWEED, na.rm = TRUE)) rockweed_section1_L ``` ```{r} result <- algae %>% group_by(SECTION) %>% summarise(across(5:19, sum, na.rm = TRUE)) # remove number and assigned number columns & stop the data at line 482 df <- df[, !(names(df) %in% c("number", "assigned_number"))] df <- df[1:482, ] # can you sum the number of times "ulva" appears across each section and zonation? df_ulva_sum <- df %>% group_by(section, zonation) %>% summarise(ulva_sum = sum(ulva, na.rm = TRUE), .groups = 'drop') # Convert data types and handle missing values if any algae <- algae %>% mutate(across(everything(), as.factor)) %>% replace(is.na(.), 0) # Replace NA values with 0 (assuming NA means absence) # Summarize data for each SECTION and ZONATION summary_data <- ALGAE %>% group_by(SECTION, ZONATION) %>% summarize_all(sum) %>% gather(key = "ALGAE_TYPE", value = "COUNT", -SECTION, -NUMBER, -ASSIGNED_NUMBER, -ZONATION) ``` ```{r} #species richness and diversity ```