-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6b5668
commit fba5507
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/env Rscript | ||
|
||
t <- readr::read_csv("counts.csv") | ||
t$total <- t$n_cam_on + t$n_cam_off | ||
|
||
ggplot2::ggplot(t, ggplot2::aes(x = time, y = total)) + | ||
ggplot2::geom_area(fill = "grey") + | ||
ggplot2::geom_line(ggplot2::aes(x = time, y = n_cam_on), color = "green") + | ||
ggplot2::geom_point(ggplot2::aes(x = time, y = n_cam_on), color = "green") + | ||
ggplot2::geom_line(ggplot2::aes(x = time, y = n_cam_off), color = "red") + | ||
ggplot2::geom_point(ggplot2::aes(x = time, y = n_cam_off), color = "red") + | ||
ggplot2::scale_x_time() + | ||
ggplot2::labs( | ||
caption = paste0( | ||
"Green: camera on. Red: camera off. Shade: total.\n" | ||
) | ||
) + | ||
ggplot2::theme( | ||
axis.text.x = ggplot2::element_text( | ||
angle = 90, | ||
vjust = 0.5, | ||
hjust = 1 | ||
) | ||
) | ||
|
||
# ggplot2::scale_x_time(labels = "%H:%M") + | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
time,n_cam_on,n_cam_off | ||
8:58,2,2 | ||
9:29,15,1 | ||
9:57,14,2 | ||
10:31,15,1 | ||
11:48,16,1 | ||
13:08,15,0 | ||
13:48,15,0 | ||
14:23,14,1 | ||
14:48,15,0 | ||
15:18,13,2 | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.