Skip to content

Commit

Permalink
edit code
Browse files Browse the repository at this point in the history
  • Loading branch information
lindseylabrie committed Nov 15, 2023
1 parent df37ae2 commit 143d22a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 5 deletions.
Binary file modified plots/JamesDO.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/JamesTemp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/MeanPosteriors.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/MeanPosteriorsDistanceBubbles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/TotalMovementPlot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions silver_carp_telemetry.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ max(abs_mvmt$total_movement)
ggsave(TotalMovementPlot,file="plots/TotalMovementPlot.jpg", dpi = 750, width = 6, height = 5,
units = "in")

## median distance moved not including zero
## mean total distance moved, not including zeros
max_dist_nozero <-abs_mvmt %>% filter(total_movement > 1)


Expand All @@ -145,8 +145,7 @@ ggplot(max_dist_nozero, aes(x = reorder(as.factor(transmitter_id), -total_moveme
axis.ticks = element_blank())

mean(max_dist_nozero$total_movement)


# n = 35 fish

# James River Flow Data

Expand Down Expand Up @@ -210,8 +209,8 @@ cumulative_abs_movement <- rkm_tracker_date %>% mutate(abs_dist=abs(distance)) %
mutate(total_movement = abs(rkm - lag(rkm,1))) %>%
group_by(transmitter_id)%>%
replace_na(list(total_movement=0)) %>%
mutate(cumulative_movement=cumsum(total_movement)) %>%
mutate(cumulative_movement_s=cumulative_movement/max(cumulative_movement),
mutate(cumulative_movement=cumsum(total_movement),
cumulative_movement_s=cumulative_movement/max(cumulative_movement),
max_cumulative_mvmt=max(cumulative_movement)) %>%
group_by(transmitter_id, date) %>%
summarize(total_movement = as.integer(sum(total_movement))) %>%
Expand Down

0 comments on commit 143d22a

Please sign in to comment.