-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview.Rmd
170 lines (110 loc) · 4.21 KB
/
overview.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
title: "Diving Logbook Overview"
author: "Ruben Perez Perez"
date: "`r Sys.Date()`"
output:
html_document:
## toc: true
## toc_float: true
theme: cerulean
df_print: paged
---
<!-- "df_print: pages" can make pages out of the table-->
```{r global-options, include=FALSE}
# Sets size of the plots and saves them in a Fig folder
knitr::opts_chunk$set(fig.width=8, fig.height=5.34, fig.path='Figs/',
warning=FALSE, message=FALSE)
## The following lines will be used to test the .Rmd file without being pushed:
# Sets the working directory to parent directory of where the .Rmd is (usually in the files folder)
# knitr::opts_knit$set(root.dir = normalizePath(".."))
# Installs and calls the divewatchr R package
# devtools::install_github("rubenpp7/divewatchr")
# library(divewatchr)
# library(dplyr)
```
<br></br>
This document provides a thorough visualization and exploration of a SCUBA Diving Logbook through the usage of spatio-temporal and categorical plots and maps and informative data tables.
<i>Please note that some plots may seem incomplete. This is due to the lack of high quality data in the logbook, e.g. maximumDepthInMeters, locationID and bottomTime were not recorded for all the dives.</i>
<!-- Making tabs
```{css echo=FALSE}
.tabset h2 {display: none;}
``` -->
# {.tabset .tabset-fade}
<!-- <h2>Maps and plots</h2> -->
## Maps and plots
### Dives distribution map
This is an interactive map with detailed information on each dive (<i>feel free to click and hover over the dive points to find more information about each dive</i>):
```{r echo=FALSE}
logbook_map()
```
***
<br/><br/>
### Number of dive types
This barplot shows the number of dives per dive type and class. It reflects the diving experience of the diver regarding performance and type of training.
```{r echo=FALSE}
divetypes()
```
***
<br/><br/>
### Cumulative number of dives
This plot shows the cumulative number of dives over time. It reflects the overall diving experience of the diver.
```{r echo=FALSE}
cum_dives()
```
***
<br/><br/>
### Logged dives depths
This scatterplot shows the maximum depths of a number of dives over time. It reflects the experience of the diver regarding depth.
```{r echo=FALSE}
logged_depths()
```
***
<br/><br/>
### Dives per region and platform
This barplot shows the number of dives per region, country and platform of entrance to the water. It reflects the experience of the diver regarding variety of divesites while providing a glimpse of the experience of the diver regarding the entrance to the water.
```{r echo=FALSE}
divecount_reg()
```
***
<br/><br/>
### Dive sites depths variation
This boxplot shows the maximum depth variation of each divesite according to the data collected from this logbook. This plot can be helpful for planning dives or trainings with specific depth requirements.
```{r echo=FALSE}
divesite_depths()
```
<!-- *** -->
<!-- <br/><br/> -->
<!-- ### Platform type dives -->
<!-- This barplot shows the number of dives per platform and region/country (boat, shore, pool). This plot gives a glimpse of the experience of the diver regarding the entrance to the water. -->
<!-- ```{r echo=FALSE} -->
<!-- divetypes_platform() -->
<!-- ``` -->
***
<br/><br/>
<!-- <h2>Data</h2> -->
## Data
### Highlights
This data frame shows some highlights extracted from the diving logbook. Please take into account that not all the data (such as dates, depths or bottom times) are always recorded for every dive.
```{r echo=FALSE}
knitr::kable(logbook_highlights())
```
***
<br/><br/>
### Logbook data
This data frame shows the diving logbook used. Personal information such as eventRemarks are omitted from this data frame
```{r echo=FALSE, rows.print=15}
if(dir.exists("divewatchr_data")){
load('divewatchr_data/scuba_clean.RData')
}
transmute (scuba_clean, eventDate, locationID, locality, maximumDepth = maximumDepthInMeters, bottomTime, diveType, diveClass, platformType, region, country)
```
***
<br/><br/>
<!-- <h2>Certifications</h2> -->
## Certifications
```{r echo=FALSE, rows.print=15}
if(dir.exists("divewatchr_data")){
load('divewatchr_data/scuba_cert.RData')
}
knitr::kable(scuba_cert %>% select (-instructorID))
```